凉纪 2 роки тому
батько
коміт
ba5b1eaf9b

+ 1 - 2
src/assets/styles/element-ui.scss

@@ -95,6 +95,5 @@
 }
 
 .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{
-  background-color:#008CD6 !important;
-  color:#fff;
+  background-color:#d1e0f1  !important;
 }

+ 1 - 2
src/assets/styles/ruoyi.scss

@@ -104,10 +104,9 @@
 /** 表格布局 **/
 .pagination-container {
 	position: relative;
-	height: 25px;
+	height: 30px;
 	margin-bottom: 10px;
 	margin-top: 15px;
-	padding: 10px 20px !important;
 }
 
 /* tree border */

+ 5 - 5
src/components/Pagination/index.vue

@@ -31,7 +31,7 @@ export default {
     },
     limit: {
       type: Number,
-      default: 20
+      default: 10
     },
     pageSizes: {
       type: Array,
@@ -104,10 +104,10 @@ export default {
 </script>
 
 <style scoped>
-.pagination-container {
-  background: #fff;
-  padding: 32px 16px;
-}
+/*.pagination-container {*/
+/*  background: #fff;*/
+/*  padding: 32px 16px;*/
+/*}*/
 .pagination-container.hidden {
   display: none;
 }

+ 3 - 3
src/components/orgTreeSelect/index.vue

@@ -191,14 +191,14 @@ export default {
         this.recursionTreeHandler(this.queryForm.type, [data]);
       }
       // debugger;
-      // this.sNodeList = this.$refs.tree.getCheckedNodes();
-      // this.$emit("selectNode", JSON.stringify(this.sNodeList));
+      this.sNodeList = this.$refs.tree.getCheckedNodes();
+      this.$emit("selectNode", JSON.stringify(this.sNodeList));
     },
     recursionTreeHandler(type, tree) {
       tree.forEach((item) => {
         if (type == item.type) {
           this.$refs.tree.setCheckedKeys([item.id])
-       
+
         }
       });
       if (tree.children && tree.children.length > 0) {

+ 3 - 3
src/layout/components/TagsView/ScrollPane.vue

@@ -10,7 +10,7 @@ const tagAndTagSpacing = 4 // tagAndTagSpacing
 
 export default {
   name: 'ScrollPane',
-  
+
   data() {
     return {
       left: 0
@@ -20,7 +20,7 @@ export default {
     scrollWrapper() {
       return this.$refs.scrollContainer.$refs.wrap
     },
-    
+
   },
   mounted() {
     this.scrollWrapper.addEventListener('scroll', this.emitScroll, true)
@@ -94,7 +94,7 @@ export default {
       bottom: 0px;
     }
     .el-scrollbar__wrap {
-      height: 39px;
+      height: 45px;
     }
   }
 }

+ 2 - 2
src/mixins/tableList.js

@@ -3,8 +3,8 @@ export default {
     return {
       //分页参数,最终合并提交
       pages:{
-        page: 1,
-        size: 10,
+        pageNum: 1,
+        pageSize: 10,
         total: 0,
       },
       // 遮罩层

+ 1 - 1
src/views/system/workTimeSet/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-container" style="padding-top: 5px;">
+  <div class="app-container" style="padding-top: 0;">
 
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <el-tab-pane label="作息配置" name="作息配置">

+ 30 - 20
src/views/system/workTimeSet/workTime.vue

@@ -1,6 +1,5 @@
 <template>
   <div class="tabs-container">
-
     <el-row :gutter="20">
       <!--机构数据-->
       <el-col :span="4" :xs="24">
@@ -16,7 +15,7 @@
         </div>
         <div class="tree-container">
           <div style="margin-bottom: 10px;">
-            <el-checkbox v-model="queryParams.checkSub" @change="changeCheckBox">是否关联下级机构</el-checkbox>
+            <el-checkbox v-model="queryParams.checkSub" @change="changeCheckBox">关联下级</el-checkbox>
           </div>
           <el-tree
             :data="deptOptions"
@@ -46,6 +45,7 @@
               range-separator="-"
               start-placeholder="开始日期"
               end-placeholder="结束日期"
+              :clearable="false"
             ></el-date-picker>
           </el-form-item>
           <el-form-item label="营业状态" prop="status">
@@ -65,7 +65,7 @@
           </el-form-item>
           <el-form-item>
             <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetForm">重置</el-button>
           </el-form-item>
         </el-form>
 
@@ -93,12 +93,12 @@
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
         </el-row>
 
-        <el-table v-loading="loading" style="width: auto;" size="nimi" border :data="tableList">
+        <el-table v-loading="loading" style="width: auto;" size="mini" border :data="tableList">
           <el-table-column v-if="columns[0].visible" prop="orgName" label="机构"></el-table-column>
           <el-table-column v-if="columns[1].visible" label="日期" >
             <span slot-scope="scope">{{scope.row.ymdDate}}</span>
           </el-table-column>
-          <el-table-column v-if="columns[2].visible" label="营业状态">
+          <el-table-column v-if="columns[2].visible" label="营业状态" :width="100">
             <template slot-scope="r">{{r.row.isEnable?'营业':'歇业'}}</template>
           </el-table-column>
           <el-table-column v-if="columns[3].visible" label="上下班时间段">
@@ -116,7 +116,7 @@
               <span>{{scope.row.noonbreakStart}}-{{scope.row.noonbreakEnd}}</span>
             </template>
           </el-table-column>
-          <el-table-column v-if="columns[6].visible" prop="modifiedName" label="更新人"></el-table-column>
+          <el-table-column v-if="columns[6].visible" prop="modifiedName" label="更新人" width="100"></el-table-column>
           <el-table-column v-if="columns[7].visible" label="更新时间" >
             <span slot-scope="scope">{{scope.row.updateTime}}</span>
           </el-table-column>
@@ -128,10 +128,11 @@
         </el-table>
 
         <pagination
-          v-show="pages.total>0"
-          :total="pages.total"
-          :page.sync="pages.pageNum"
-          :limit.sync="pages.pageSize"
+          class="pages-box"
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
           @pagination="getList"
         />
       </el-col>
@@ -146,7 +147,6 @@
 </template>
 
 <script>
-import tableListMixins  from '@/mixins/tableList'
 import DialogEdit from './dialog.edit'
 import DialogAdd from './dialog.add'
 
@@ -163,10 +163,11 @@ export default {
   /**  得先引入字典才能使用 */
   dicts: ['sys_business_type'],
   /** 引入基础minxins*/
-  mixins:[tableListMixins],
   components: {DialogEdit,DialogAdd},
   data() {
     return {
+      // 遮罩层
+      loading: false,
       //选中的行
       selectRow:null,
       // 显示搜索条件
@@ -187,12 +188,15 @@ export default {
         label: "name"
       },
       // 查询参数
-      queryParams: {
+     queryParams: {
         checkSub: false,
         orgId: null,
         isEnable:'1',
+        pageNum:1,
+        pageSize:10,
         range: [formatTime(timeb), formatTime(timea)],
       },
+      total:0,
       // 列信息
       columns: [
         { key: 0, label: `机构`, visible: true },
@@ -231,13 +235,10 @@ export default {
     /** 查询列表 */
     getList() {
       this.loading = true;
-      let data = {
-        ...this.queryParams,
-        ...this.pages
-      }
-      tableList(data).then(response => {
+      console.log(this.queryParams,'pages')
+      tableList(this.queryParams,).then(response => {
           this.tableList = response.rows;
-          this.pages.total = response.total;
+          this.total = response.total;
           this.loading = false;
         }
       ).catch(err=>{
@@ -290,9 +291,18 @@ export default {
         orgId: null,
         isEnable:'1',
         range: [formatTime(timeb), formatTime(timea)],
-      }
+      };
+      this.getList();
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
     },
   }
 };
 
 </script>
+<style lang="scss">
+
+</style>

+ 23 - 16
src/views/system/workTimeSet/workTimeWeek.vue

@@ -1,6 +1,5 @@
 <template>
   <div class="tabs-container">
-
     <el-row :gutter="20">
       <!--机构数据-->
       <el-col :span="4" :xs="24">
@@ -56,7 +55,7 @@
           </el-form-item>
           <el-form-item>
             <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetForm">重置</el-button>
           </el-form-item>
         </el-form>
 
@@ -75,7 +74,7 @@
           <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
         </el-row>
 
-        <el-table v-loading="loading" style="width: auto;" size="nimi" border :data="tableList">
+        <el-table v-loading="loading" style="width: auto;" size="mini" border :data="tableList">
           <el-table-column v-if="columns[0].visible" prop="orgName" label="机构"></el-table-column>
           <el-table-column v-if="columns[1].visible" prop="effectiveDate" label="生效日期" ></el-table-column>
           <el-table-column v-if="columns[2].visible" prop="workDay" label="工作日"></el-table-column>
@@ -93,10 +92,10 @@
         </el-table>
 
         <pagination
-          v-show="pages.total >0"
-          :total="pages.total"
-          :page.sync="pages.pageNum"
-          :limit.sync="pages.pageSize"
+          v-show="total >0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
           @pagination="getList"
         />
       </el-col>
@@ -109,18 +108,18 @@
 </template>
 
 <script>
-import tableListMixins  from '@/mixins/tableList'
 import DialogTemplate from './dialog.template'
 /** 引入节点树接口*/
 import { deptTreeSelect} from "@/api/system/public";
 import {weekTableList} from './api'
+import {formatTime} from "@/utils/ruoyi";
 export default {
   /**  得先引入字典才能使用 */
   dicts: ['sys_business_type'],
-  mixins:[tableListMixins],
   components: {DialogTemplate},
   data() {
     return {
+      loading:false,
       //选中的行
       selectRow:null,
       // 显示搜索条件
@@ -142,10 +141,14 @@ export default {
       },
       // 查询参数
       queryParams: {
+        pageNum: 1,
+        pageSize: 10,
         checkSub: false,
         orgId: null,
         isEnable:false,
       },
+      dateRange:[],
+      total:0,
       // 列信息
       columns: [
         { key: 0, label: `机构`, visible: true },
@@ -184,6 +187,11 @@ export default {
     });
   },
   methods: {
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
     /** 查看 */
     lookItem(row) {
       this.selectRow = row;
@@ -199,13 +207,9 @@ export default {
     },
     /** 查询列表 */
     getList() {
-      let data = {
-        ...this.queryParams,
-        ...this.pages
-      }
-      weekTableList(this.addDateRange(data, this.dateRange)).then(response => {
+      weekTableList(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
           this.tableList = response.data.records;
-          this.pages.total = response.data.total;
+          this.total = response.data.total;
           this.loading = false;
         }
       ).catch(err=>{
@@ -216,7 +220,6 @@ export default {
     getDeptTree() {
       deptTreeSelect().then(response => {
         this.orgTree = response.data;
-        console.log( this.deptOptions,' this.deptOptions')
         this.defaultKeys.push(response.data[0].id);
         this.queryParams.orgId = response.data[0].id;
         this.handleQuery();
@@ -246,9 +249,13 @@ export default {
     /* 重置搜索 */
     resetForm(name){
       this.queryParams = {
+          pageNum: 1,
+          pageSize: 10,
           orgId: null,
           isEnable:false,
       }
+      this.dateRange = [];
+      this.getList();
     },
   }
 };