Bladeren bron

排成设置以及定时报表搜索

yuhan 4 maanden geleden
bovenliggende
commit
45a990aaa6

+ 105 - 100
src/views/module_interLock/baseScheduleSet/BaseScheduleSetList.vue

@@ -1,115 +1,120 @@
 <template>
-  <a-card :bordered="false">
-
-    <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <div class="iotmenu-search-container">
-        <div class="item-search">
-          <a-select style="width: 220px" v-model="queryParam.status" placeholder="请选择状态" @change="searchQuery">
-            <a-select-option value="">全部</a-select-option>
-            <a-select-option value="0">正常</a-select-option>
-            <a-select-option value="-1">停止</a-select-option>
-          </a-select>
+  <div style="height: 100%;">
+    <div class="iotmenu-content-header">
+      <a-icon type="file-text" />
+      <span>排成设置</span>
+    </div>
+    <a-card :bordered="false">
+      <!-- 查询区域 -->
+      <div class="table-page-search-wrapper">
+        <div class="iotmenu-search-container">
+          <div class="item-search">
+            <a-select style="width: 220px" v-model="queryParam.status" placeholder="请选择状态" @change="searchQuery">
+              <a-select-option value="">全部</a-select-option>
+              <a-select-option value="0">正常</a-select-option>
+              <a-select-option value="-1">停止</a-select-option>
+            </a-select>
+          </div>
         </div>
       </div>
-    </div>
-    <!-- <div class="table-page-search-wrapper">
-      <a-form-model layout="inline" :model="queryParam" @keyup.enter.native="searchQuery">
-        <a-row :gutter="24">
-          <a-col :md="6" :sm="10">
-            <a-form-model-item label="任务状态" prop="status">
-              <a-select style="width: 220px" v-model="queryParam.status" placeholder="请选择状态">
-                <a-select-option value="">全部</a-select-option>
-                <a-select-option value="0">正常</a-select-option>
-                <a-select-option value="-1">停止</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col :md="6" :sm="10" >
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form-model>
-    </div> -->
-
-    <!-- 操作按钮区域 -->
-    <!-- <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('定时任务信息')">导出</a-button>
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
-        <a-button type="primary" 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> -->
+      <!-- <div class="table-page-search-wrapper">
+        <a-form-model layout="inline" :model="queryParam" @keyup.enter.native="searchQuery">
+          <a-row :gutter="24">
+            <a-col :md="6" :sm="10">
+              <a-form-model-item label="任务状态" prop="status">
+                <a-select style="width: 220px" v-model="queryParam.status" placeholder="请选择状态">
+                  <a-select-option value="">全部</a-select-option>
+                  <a-select-option value="0">正常</a-select-option>
+                  <a-select-option value="-1">停止</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="10" >
+              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div> -->
 
-    <!-- table区域-begin -->
-    <div>
-      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      <!-- 操作按钮区域 -->
+      <!-- <div class="table-operator">
+        <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+        <a-button type="primary" icon="download" @click="handleExportXls('定时任务信息')">导出</a-button>
+        <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+          <a-button type="primary" 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-table
-        ref="table"
-        size="middle"
-        bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        :scroll="{x:true}"
-        @change="handleTableChange">
-        <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
+      <!-- table区域-begin -->
+      <div>
+        <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+          <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
+          <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+        </div> -->
 
-        <!-- 字符串超长截取省略号显示-->
-        <span slot="description" slot-scope="text">
-          <j-ellipsis :value="text" :length="20" />
-        </span>
-        <span slot="parameterRender" slot-scope="text">
-          <j-ellipsis :value="text" :length="20" />
-        </span>
+        <a-table
+          ref="table"
+          size="middle"
+          bordered
+          rowKey="id"
+          :columns="columns"
+          :dataSource="dataSource"
+          :pagination="ipagination"
+          :loading="loading"
+          :scroll="{x:true}"
+          @change="handleTableChange">
+          <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
 
+          <!-- 字符串超长截取省略号显示-->
+          <span slot="description" slot-scope="text">
+            <j-ellipsis :value="text" :length="20" />
+          </span>
+          <span slot="parameterRender" slot-scope="text">
+            <j-ellipsis :value="text" :length="20" />
+          </span>
 
-        <span slot="action" slot-scope="text, record">
-          <a @click="resumeJob(record)" v-if="record.status==-1">启动</a>
-          <a @click="pauseJob(record)" v-if="record.status==0">停止</a>
 
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
-              <a-menu-item><a @click="executeImmediately(record)">执行一次</a></a-menu-item>
-              <a-menu-item><a @click="handleEdit(record)">编辑</a></a-menu-item>
-              <!-- <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item> -->
-            </a-menu>
-          </a-dropdown>
-        </span>
+          <span slot="action" slot-scope="text, record">
+            <a @click="resumeJob(record)" v-if="record.status==-1">启动</a>
+            <a @click="pauseJob(record)" v-if="record.status==0">停止</a>
 
-        <!-- 状态渲染模板 -->
-        <template slot="customRenderStatus" slot-scope="status">
-          <a-tag v-if="status==0" color="green">已启动</a-tag>
-          <a-tag v-if="status==-1" color="orange">已暂停</a-tag>
-        </template>
-      </a-table>
-    </div>
-    <!-- table区域-end -->
+            <a-divider type="vertical" />
+            <a-dropdown>
+              <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+              <a-menu slot="overlay">
+                <a-menu-item><a @click="executeImmediately(record)">执行一次</a></a-menu-item>
+                <a-menu-item><a @click="handleEdit(record)">编辑</a></a-menu-item>
+                <!-- <a-menu-item>
+                  <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                    <a>删除</a>
+                  </a-popconfirm>
+                </a-menu-item> -->
+              </a-menu>
+            </a-dropdown>
+          </span>
+
+          <!-- 状态渲染模板 -->
+          <template slot="customRenderStatus" slot-scope="status">
+            <a-tag v-if="status==0" color="green">已启动</a-tag>
+            <a-tag v-if="status==-1" color="orange">已暂停</a-tag>
+          </template>
+        </a-table>
+      </div>
+      <!-- table区域-end -->
 
-    <!-- 表单区域 -->
-    <base-scheduleSet-modal ref="modalForm" @ok="modalFormOk"></base-scheduleSet-modal>
-  </a-card>
+      <!-- 表单区域 -->
+      <base-scheduleSet-modal ref="modalForm" @ok="modalFormOk"></base-scheduleSet-modal>
+    </a-card>
+  </div>
 </template>
 
 <script>

+ 10 - 3
src/views/module_interLock/interlockTimedReport/InterlockTimedReportList.vue

@@ -4,7 +4,7 @@
     <div class="table-page-search-wrapper">
       <div class="iotmenu-search-container">
         <div class="item-search">
-          <j-dict-select-tag placeholder="请选择报表类型" v-model="queryParam.reportType" dictCode="report_type" @change="searchQuery"/>
+          <a-select placeholder="报表类型" v-model="queryParam.reportType" allowClear :options="reportTypeOptions" @change="searchQuery"></a-select>
         </div>
         <div class="item-search">
           <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" class="query-group-cust" v-model="queryParam.createTime_begin" @change="searchQuery"></j-date>
@@ -131,6 +131,7 @@
   import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
   import { downFiles_info } from '@api/api'
   import { colAuthFilter } from "@/utils/authFilter"
+  import {initDictOptions} from '@/components/dict/JDictSelectUtil'
 
   export default {
     name: 'InterlockDataReportList',
@@ -196,7 +197,8 @@
           importExcelUrl: "report/interlockDataReport/importExcel",
           
         },
-        dictOptions:{},
+        // dictOptions:{},
+        reportTypeOptions:[],
         superFieldList:[],
       }
     },
@@ -205,7 +207,6 @@
       this.columns = colAuthFilter(this.columns,'history:');
       this.loadData();
       this.initDictConfig();
-
       this.getSuperFieldList();
     },
     computed: {
@@ -214,7 +215,13 @@
       },
     },
     methods: {
+      // 由于j-dict-select-tag删除后无placeholder显示,所以不用系统内置的
       initDictConfig(){
+        initDictOptions('report_type').then((res) => {
+          if (res.success) {
+            this.reportTypeOptions = res.result;
+          }
+        });
       },
       // 下载
       downloadFiles(record){