zhaoke 1 year ago
parent
commit
c815f71f92

+ 8 - 8
src/store/modules/savedSettings.js

@@ -2,7 +2,7 @@ import router from '@/router'
 
 const savedHiddenColumnKeysMap = JSON.parse(localStorage.getItem('savedHiddenColumnKeysMap') ?? '{}')
 const savedTableFilterValuesMap = JSON.parse(localStorage.getItem('savedTableFilterValuesMap') ?? '{}')
-const savedFormDataMap = JSON.parse(localStorage.getItem('savedFormDataMap') ?? '{}')
+const savedFormDataMap = JSON.parse(sessionStorage.getItem('savedFormDataMap') ?? '{}')
 
 const state = {
   savedHiddenColumnKeysMap,
@@ -11,7 +11,7 @@ const state = {
 }
 
 const mutations = {
-  SAVE_HIDDEN_COLUMN_KEYS(state, { keys, tableName }) {
+  SAVE_HIDDEN_COLUMN_KEYS (state, { keys, tableName }) {
     const fullTableName = router.currentRoute.name + (tableName ? `/${tableName}` : '')
     state.savedHiddenColumnKeysMap = {
       ...state.savedHiddenColumnKeysMap,
@@ -19,7 +19,7 @@ const mutations = {
     }
     localStorage.setItem('savedHiddenColumnKeysMap', JSON.stringify(state.savedHiddenColumnKeysMap))
   },
-  SAVE_TABLE_FILTER_VALUES(state, { filterValues, tableName }) {
+  SAVE_TABLE_FILTER_VALUES (state, { filterValues, tableName }) {
     const fullTableName = router.currentRoute.name + (tableName ? `/${tableName}` : '')
     state.savedTableFilterValuesMap = {
       ...state.savedTableFilterValuesMap,
@@ -27,24 +27,24 @@ const mutations = {
     }
     localStorage.setItem('savedTableFilterValuesMap', JSON.stringify(state.savedTableFilterValuesMap))
   },
-  SAVE_FORM_DATA(state, { formData, formName }) {
+  SAVE_FORM_DATA (state, { formData, formName }) {
     const fullFormName = router.currentRoute.name + (formName ? `/${formName}` : '')
     state.savedFormDataMap = {
       ...state.savedFormDataMap,
       [fullFormName]: formData
     }
-    localStorage.setItem('savedFormDataMap', JSON.stringify(state.savedFormDataMap))
+    sessionStorage.setItem('savedFormDataMap', JSON.stringify(state.savedFormDataMap))
   }
 }
 
 const actions = {
-  saveHiddenColumnKeys({ commit }, payload) {
+  saveHiddenColumnKeys ({ commit }, payload) {
     commit('SAVE_HIDDEN_COLUMN_KEYS', payload)
   },
-  saveTableFilterValues({ commit }, payload) {
+  saveTableFilterValues ({ commit }, payload) {
     commit('SAVE_TABLE_FILTER_VALUES', payload)
   },
-  saveFormData({ commit }, payload) {
+  saveFormData ({ commit }, payload) {
     commit('SAVE_FORM_DATA', payload)
   }
 }

+ 37 - 100
src/views/statisticsCharts/components/statisticsHeadercod.vue

@@ -3,95 +3,33 @@
     <template v-if="title">
       <div class="title">{{ title }}</div>
     </template>
-    <el-form
-      ref="form"
-      class="form"
-      :model="formData"
-    >
-      <el-form-item
-        v-for="item in formItems"
-        :key="item.prop"
-        :prop="item.prop"
-        :label="item.label"
-        :style="{
+    <el-form ref="form" class="form" :model="formData">
+      <el-form-item v-for="item in formItems" :key="item.prop" :prop="item.prop" :label="item.label" :style="{
           width: item.width || '120px'
-        }"
-      >
+        }">
         <template v-if="item.inputType === 'input'">
-          <el-input
-            v-model="formData[item.prop]"
-            :size="item.size || 'small'"
-            :placeholder="item.placeholder || '请输入'"
-            :clearable="item.clearable"
-          />
+          <el-input v-model="formData[item.prop]" :size="item.size || 'small'" :placeholder="item.placeholder || '请输入'" :clearable="item.clearable" />
         </template>
         <template v-if="item.inputType === 'select'">
-          <el-select
-            v-model="formData[item.prop]"
-            :filterable="item.filterable"
-            :default-first-option="item.filterable"
-            :size="item.size || 'small'"
-            :placeholder="item.placeholder || '请选择'"
-            :multiple="item.multiple"
-            :collapse-tags="item.multiple"
-            :clearable="item.clearable"
-            :disabled="item.disabled"
-          >
-            <el-option
-              v-for="option in item.options"
-              :key="option.value"
-              :value="option.value"
-              :label="option.label"
-            />
+          <el-select v-model="formData[item.prop]" :filterable="item.filterable" :default-first-option="item.filterable" :size="item.size || 'small'" :placeholder="item.placeholder || '请选择'" :multiple="item.multiple" :collapse-tags="item.multiple" :clearable="item.clearable" :disabled="item.disabled">
+            <el-option v-for="option in item.options" :key="option.value" :value="option.value" :label="option.label" />
           </el-select>
         </template>
         <template v-if="item.inputType === 'datePicker'">
-          <el-date-picker
-          @change="dateup"
-            v-model="formData[item.prop]"
-            :size="item.size || 'small'"
-            type="daterange"
-            value-format="yyyy-MM-dd"
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-          />
+          <el-date-picker @change="dateup" v-model="formData[item.prop]" :size="item.size || 'small'" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
         </template>
         <template v-if="item.inputType === 'cascader'">
-          <el-cascader
-            v-model="formData[item.prop]"
-            :size="item.size || 'small'"
-            :placeholder="item.placeholder || '请选择'"
-            :options="item.options"
-            :props="item.props"
-            :clearable="item.clearable"
-            :disabled="item.disabled"
-          />
+          <el-cascader v-model="formData[item.prop]" :size="item.size || 'small'" :placeholder="item.placeholder || '请选择'" :options="item.options" :props="item.props" :clearable="item.clearable" :disabled="item.disabled" />
         </template>
       </el-form-item>
       <el-form-item v-if="formItems.length">
-        <el-button
-          type="primary"
-          size="small"
-          @click="getData"
-          >{{ buttonText }}</el-button
-        >
+        <el-button type="primary" size="small" @click="getData">{{ buttonText }}</el-button>
       </el-form-item>
       <el-form-item v-if="withExport">
-        <img
-          src="../../../assets/nav/ic_export.png"
-          title="导出"
-          class="btn-icon-only"
-          @click="exportClickHandler"
-        />
+        <img src="../../../assets/nav/ic_export.png" title="导出" class="btn-icon-only" @click="exportClickHandler" />
       </el-form-item>
       <el-form-item v-if="withSetting">
-        <img
-          src="../../../assets/nav/ic_setting.png"
-          title="节点设置"
-          class="btn-icon-only"
-          @click="settingClickHandler"
-        />
+        <img src="../../../assets/nav/ic_setting.png" title="节点设置" class="btn-icon-only" @click="settingClickHandler" />
       </el-form-item>
     </el-form>
   </div>
@@ -132,7 +70,7 @@ export default {
       default: false
     }
   },
-  data() {
+  data () {
     return {
       formData: {
         range: '',
@@ -175,7 +113,7 @@ export default {
               label: '航站楼'
             }
           ],
-          changeHandler(value) {
+          changeHandler (value) {
             this.setInOrOutOptions(value)
             const rangeMap = {
               航线: 'airline',
@@ -287,27 +225,27 @@ export default {
   },
   computed: {
     ...mapGetters(['savedFormDataMap']),
-    formDataObj() {
+    formDataObj () {
       return JSON.parse(JSON.stringify(this.formData))
     }
   },
   watch: {
     items: {
-      handler(val) {
+      handler (val) {
         val && (this.formItems = val)
       },
       deep: true,
       immediate: true
     },
     data: {
-      handler(val) {
+      handler (val) {
         val && (this.formData = val)
       },
       deep: true,
       immediate: true
     },
     formDataObj: {
-      handler(val, oldVal) {
+      handler (val, oldVal) {
         this.formItems.forEach(item => {
           if (item.changeHandler && String(val[item.prop]) !== String(oldVal[item.prop])) {
             item.changeHandler.call(this, val[item.prop])
@@ -317,7 +255,7 @@ export default {
       deep: true
     }
   },
-  created() {
+  created () {
     this.customItems.forEach(item => {
       if (typeof item.itemIndex === 'number') {
         if (item.prop) {
@@ -332,7 +270,7 @@ export default {
     const savedFormData = this.savedFormDataMap[this.$route.name]
     this.formItems.forEach(item => {
       if (item.queryId && item.setKey) {
-        this.getOptions(item.queryId, item.setKey, item.prop,item.coy)
+        this.getOptions(item.queryId, item.setKey, item.prop, item.coy)
       }
       if (savedFormData?.[item.prop]) {
         this.formData[item.prop] = savedFormData[item.prop]
@@ -344,18 +282,17 @@ export default {
   },
   methods: {
     dateup (value) {
-      debugger
       let arr = {
-        fd1:value[0],
-        fd2:value[1],
+        fd1: value[0],
+        fd2: value[1],
       }
       this.formItems.forEach(item => {
-      if (item.queryId && item.setKey) {
-        this.getOptions(item.queryId, item.setKey, item.prop,arr)
-      }
-    })
+        if (item.queryId && item.setKey) {
+          this.getOptions(item.queryId, item.setKey, item.prop, arr)
+        }
+      })
     },
-    getData() {
+    getData () {
       try {
         this.formItems.forEach(item => {
           if (item.requiredWarning && (!this.formData[item.prop] || this.formData[item.prop].length === 0)) {
@@ -381,13 +318,13 @@ export default {
         formData: this.formData
       })
     },
-    exportClickHandler() {
+    exportClickHandler () {
       this.$emit('export')
     },
-    settingClickHandler() {
+    settingClickHandler () {
       this.$emit('setting')
     },
-    setInOrOutOptions(range) {
+    setInOrOutOptions (range) {
       const theInOrOutItem = this.formItems.find(item => item.prop === 'inOrOut')
       switch (range) {
         case '全部':
@@ -432,7 +369,7 @@ export default {
           break
       }
     },
-    async getOptions(queryId, setKey, prop,cop) {
+    async getOptions (queryId, setKey, prop, cop) {
       try {
         const { code, returnData, message } = await TempQuery({
           serviceId: queryId,
@@ -473,12 +410,12 @@ export default {
     height: 32px;
     line-height: 32px;
     font-size: 18px;
-    font-family: Helvetica, 'Microsoft YaHei';
+    font-family: Helvetica, "Microsoft YaHei";
     font-weight: bold;
     white-space: nowrap;
     position: relative;
     &::before {
-      content: '';
+      content: "";
       width: 4px;
       height: 20px;
       background: #2d67e3;
@@ -511,7 +448,7 @@ export default {
           }
           .el-input__inner {
             border-radius: 4px;
-            font-family: Helvetica, 'Microsoft YaHei';
+            font-family: Helvetica, "Microsoft YaHei";
             color: #303133;
             border-color: #ffffff;
             &:hover {
@@ -530,7 +467,7 @@ export default {
           border-radius: 4px;
           border-color: #ffffff;
           color: #303133;
-          font-family: Helvetica, 'Microsoft YaHei';
+          font-family: Helvetica, "Microsoft YaHei";
           &:hover {
             border-color: #c0c4cc;
           }
@@ -548,10 +485,10 @@ export default {
         .el-cascader {
           .el-input {
             .el-icon-arrow-up::before {
-              content: '\e78f';
+              content: "\e78f";
             }
             .el-icon-arrow-down::before {
-              content: '\e790';
+              content: "\e790";
             }
             &:not(.is-disabled) {
               .el-input__icon,
@@ -563,7 +500,7 @@ export default {
         }
         .el-button {
           border-radius: 4px;
-          font-family: Helvetica, 'Microsoft YaHei';
+          font-family: Helvetica, "Microsoft YaHei";
         }
         .btn-icon-only {
           width: 32px;

File diff suppressed because it is too large
+ 319 - 972
src/views/statisticsCharts/components/tableformbrs.vue


+ 18 - 34
src/views/statisticsCharts/views/report/workloadTable.vue

@@ -1,26 +1,8 @@
 <template>
   <!-- 工作量统计 -->
   <div class="statstics-wrapper">
-    <StatisticsHeader
-      title="工作量统计"
-      :items="formItems"
-      :data="formData"
-      with-setting
-      :withSetting="false"
-      @getFormData="getFormData"
-      @export="exportup"
-    />
-    <Tableformbrs
-      upid="9"
-      :data-id="dataId"
-      :isloadings="isloadings"
-      :data-content="dataContent"
-      :rows="12"
-      label-width="140px"
-      :min-height="70"
-      width="800px"
-      tableHeight="750"
-    />
+    <StatisticsHeader title="工作量统计" :items="formItems" :data="formData" with-setting :withSetting="false" @getFormData="getFormData" @export="exportup" />
+    <Tableformbrs upid="9" :data-id="dataId" :isloadings="isloadings" :data-content="dataContent" :rows="12" label-width="140px" :min-height="70" width="800px" tableHeight="750" />
   </div>
 </template>
 <script>
@@ -29,15 +11,15 @@ import Tableformbrs from '../../components/tableformbrs'
 import { Format } from '@/utils/validate'
 export default {
   name: 'ReportStatistics',
-  data() {
+  data () {
     return {
       formData: {
-        agentNumber: '',
+        employeeID: '',
         dateTime: [],
         td: '',
       },
       formItems: [
-      {
+        {
           prop: 'dateTime',
           inputType: 'datePicker',
           clearable: true,
@@ -45,7 +27,7 @@ export default {
           options: [],
         },
         {
-          prop: 'agentNumber',
+          prop: 'employeeID',
           inputType: 'select',
           placeholder: '工作人员',
           filterable: true,
@@ -53,9 +35,11 @@ export default {
           // multiple: true,
           // disabled: true,
           queryId: SERVICE_ID.workerqueryAll,
-          setKey: 'agentNumber',
-          coy: {fd1:Format('yyyy-MM-dd', new Date()),
-            fd2:Format('yyyy-MM-dd', new Date()),},
+          setKey: 'employeeID',
+          coy: {
+            fd1: Format('yyyy-MM-dd', new Date()),
+            fd2: Format('yyyy-MM-dd', new Date()),
+          },
           options: [],
         },
       ],
@@ -68,22 +52,22 @@ export default {
     StatisticsHeader,
     Tableformbrs,
   },
-  mounted() {
+  mounted () {
     this.dataContent = {
-      agentNumber:'全部',
-      fd1:Format('yyyy-MM-dd', new Date()),
-      fd2:Format('yyyy-MM-dd', new Date()),
+      employeeID: '全部',
+      fd1: Format('yyyy-MM-dd', new Date()),
+      fd2: Format('yyyy-MM-dd', new Date()),
     }
   },
   methods: {
-    getFormData(data) {
+    getFormData (data) {
       this.dataContent = {
-        agentNumber:data.agentNumber,
+        employeeID: data.employeeID,
         fd1: data.dateTime[0] ? data.dateTime[0] : '',
         fd2: data.dateTime[1] ? data.dateTime[1] : ''
       }
     },
-    exportup() {
+    exportup () {
       this.isloadings = this.isloadings += 1
     },
   },

+ 13 - 1
src/views/systemSettings/views/newAuth/components/table.vue

@@ -2,6 +2,11 @@
   <div class="table">
     <div class="table-form">
       <el-form ref="form" :model="form" label-width="100px">
+        <div class="pageSizeCd">
+          <el-form-item label="分页数量">
+            <el-input size="small" clearable placeholder="请输入分页数量" v-model="form.page_size"></el-input>
+          </el-form-item>
+        </div>
         <div class="flex-wrap fr-list">
           <el-form-item class="flex1" label="权限编码">
             <el-input size="small" clearable placeholder="请输入权限编码" v-model="form.auth_ident"></el-input>
@@ -277,7 +282,8 @@ export default {
         table_width: '',
         table_height: '',
         queryparams: '',
-        serviceID: ''
+        serviceID: '',
+        page_size: ''
       },
       tableForm: {
         columnName: "",
@@ -446,6 +452,12 @@ export default {
   .el-select {
     width: 100%;
   }
+  .pageSizeCd {
+    position: absolute;
+    top: 145px;
+    right: 493px;
+    width: 360px;
+  }
   &-yl {
     position: absolute;
     bottom: 0;

+ 1 - 0
src/views/table/index.vue

@@ -300,6 +300,7 @@ export default {
       this.pageTitle = obj.auth_name;
       this.authId = obj.auth_id
       this.queryId = obj.queryTemplateID;
+      this.pageSize = obj.page_size ? Number(obj.page_size) : 20
       this.authBtns = arrs.filter(item => Number(item.service_type) > 2 && Number(item.service_type) < 6)
       this.authBtnCol = arrs.filter(item => Number(item.service_type) == 6)
       if (this.authBtnCol.length) {

Some files were not shown because too many files changed in this diff