whj преди 11 месеца
родител
ревизия
69ec12f821

+ 180 - 129
src/views/fill/task/FillGatherTask.vue

@@ -1,125 +1,140 @@
 <template>
-  <a-card :bordered="false">
-    <div v-show="visible">
-      <div class="table-page-search-wrapper" @keyup.enter="handleEnter">
-        <a-form layout="inline">
-          <a-row :gutter="48">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="关键字">
-                <a-input v-model="queryParam.keyword" placeholder="请输入名称/类型名称" />
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="巡检人">
-                <a-select v-model="queryParam.checker" placeholder="请选择">
-                  <a-select-option
-                    v-for="{realName,userId} in checkerList"
-                    :key="userId"
-                    :label="realName"
-                    :value="userId">{{ realName }}
-                  </a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="巡检主管">
-                <a-select v-model="queryParam.checkLeader" placeholder="请选择">
-                  <a-select-option
-                    v-for="{realName,userId} in checkLeaderList"
-                    :key="userId"
-                    :label="realName"
-                    :value="userId">{{ realName }}
-                  </a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="巡检状态">
-                <a-select v-model="queryParam.status" placeholder="请选择">
-                  <a-select-option
-                    v-for="(label,value) in statusMap"
-                    :key="value"
-                    :label="label"
-                    :value="parseInt(value)">{{ label }}
-                  </a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-            <!-- </a-row>
+  <div>
+    <a-space v-show="visible" :size="50">
+      <div class="filter-icon" :class="current===0?'active':''" @click="handleFilter(0)">
+        <a-icon type="file-protect" />
+        <div>全部</div>
+      </div>
+      <div class="filter-icon" :class="current===1?'active':''" @click="handleFilter(1)">
+        <a-icon type="exception" />
+        <div>审核中</div>
+      </div>
+      <div class="filter-icon" :class="current===2?'active':''" @click="handleFilter(2)">
+        <a-icon type="exception" />
+        <div>审核被拒</div>
+      </div>
+    </a-space>
+    <a-card :bordered="false">
+      <div v-show="visible">
+        <div class="table-page-search-wrapper" @keyup.enter="handleEnter">
+          <a-form layout="inline">
+            <a-row :gutter="48">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="关键字">
+                  <a-input v-model="queryParam.keyword" placeholder="请输入名称/类型名称" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="巡检人">
+                  <a-select v-model="queryParam.checker" placeholder="请选择">
+                    <a-select-option
+                      v-for="{realName,userId} in checkerList"
+                      :key="userId"
+                      :label="realName"
+                      :value="userId">{{ realName }}
+                    </a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="巡检主管">
+                  <a-select v-model="queryParam.checkLeader" placeholder="请选择">
+                    <a-select-option
+                      v-for="{realName,userId} in checkLeaderList"
+                      :key="userId"
+                      :label="realName"
+                      :value="userId">{{ realName }}
+                    </a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="巡检状态">
+                  <a-select v-model="queryParam.status" placeholder="请选择">
+                    <a-select-option
+                      v-for="(label,value) in statusMap"
+                      :key="value"
+                      :label="label"
+                      :value="parseInt(value)">{{ label }}
+                    </a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
+              <!-- </a-row>
           <a-row :gutter="48"> -->
-            <a-col :md="6" :sm="24" >
-              <span class="table-page-search-submitButtons">
-                <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
-                <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+              <a-col :md="6" :sm="24" >
+                <span class="table-page-search-submitButtons">
+                  <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                  <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
                 <!-- <a @click="()=>{ this.advanced = !this.advanced}" style="margin-left: 8px">
                   {{ advanced ? '收起' : '展开' }}
                   <a-icon :type="advanced ? 'up' : 'down'" />
                 </a> -->
-              </span>
-            </a-col>
-          </a-row>
-        </a-form>
-      </div>
+                </span>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
 
-      <div class="table-operator" style="margin-bottom: 8px;">
-        <a-row>
-          <a-col :md="16">
-            <!--            <a-button v-if="$auth('fill-fills-add')" type="primary" icon="plus" @click="handleAdd()">新增</a-button>-->
-            <a-button
-              style="margin-left: 8px"
-              v-if="$auth('fill-fills-export')"
-              type="primary"
-              icon="download"
-              @click="doExport">导出
-            </a-button>
-            <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0">
-              <a-menu slot="overlay">
-                <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
-                  <a-menu-item key="1">
-                    <a-icon type="delete" />
-                    <a>删除</a></a-menu-item>
-                </a-popconfirm>
-              </a-menu>
-              <a-button style="margin-left: 8px">
-                批量操作
-                <a-icon type="down" />
+        <div class="table-operator" style="margin-bottom: 8px;">
+          <a-row>
+            <a-col :md="16">
+              <!--            <a-button v-if="$auth('fill-fills-add')" type="primary" icon="plus" @click="handleAdd()">新增</a-button>-->
+              <a-button
+                style="margin-left: 8px"
+                v-if="$auth('fill-fills-export')"
+                type="primary"
+                icon="download"
+                @click="doExport">导出
               </a-button>
-            </a-dropdown>
-          </a-col>
-        </a-row>
-      </div>
+              <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0">
+                <a-menu slot="overlay">
+                  <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
+                    <a-menu-item key="1">
+                      <a-icon type="delete" />
+                      <a>删除</a></a-menu-item>
+                  </a-popconfirm>
+                </a-menu>
+                <a-button style="margin-left: 8px">
+                  批量操作
+                  <a-icon type="down" />
+                </a-button>
+              </a-dropdown>
+            </a-col>
+          </a-row>
+        </div>
 
-      <s-table
-        ref="table"
-        size="default"
-        rowKey="id"
-        bordered
-        :columns="columns"
-        :data="loadData"
-        :alert="options.alert"
-        :rowSelection="options.rowSelection"
-        showPagination="auto"
-        :scroll="{x: 1800}"
-      >
-        <span slot="status" slot-scope="status">
-          <badge :status="DictCache.COLOR.FILL_GATHER_TASK_STATUS[status]" :text="statusMap[status]" />
-        </span>
-        <template #name="text,record">
-          <span v-if="record.id===nameId"> <a-input style="width:170px" v-model="record.name" /> <a @click="changeName(record.id,record.name,record.period)">保存</a></span>
-          <span v-else >{{ text }} <a @click="nameId=record.id">编辑</a></span>
-        </template>
-        <template #period="text,record">
-          <span v-if="record.id===periodId"> <a-input style="width:170px" v-model="record.period" /> <a @click="changeName(record.id,record.name,record.period)">保存</a></span>
-          <span v-else >{{ text }} <a @click="periodId=record.id">编辑</a></span>
-        </template>
-        <span slot="action" slot-scope="record">
-          <template>
-            <a @click="handleView(record)">查看</a>
-            <operation-button
-              v-show="record.status!== 2 && record.status!== 6"
-              @click="handleEdit(record)"
-            >填报</operation-button>
-            <!-- <operation-button
+        <s-table
+          ref="table"
+          size="default"
+          rowKey="id"
+          bordered
+          :columns="columns"
+          :data="loadData"
+          :alert="options.alert"
+          :rowSelection="options.rowSelection"
+          showPagination="auto"
+          :scroll="{x: 1800}"
+        >
+          <span slot="status" slot-scope="status">
+            <badge :status="DictCache.COLOR.FILL_GATHER_TASK_STATUS[status]" :text="statusMap[status]" />
+          </span>
+          <template #name="text,record">
+            <span v-if="record.id===nameId"> <a-input style="width:170px" v-model="record.name" /> <a @click="changeName(record.id,record.name,record.period)">保存</a></span>
+            <span v-else >{{ text }} <a @click="nameId=record.id">编辑</a></span>
+          </template>
+          <template #period="text,record">
+            <span v-if="record.id===periodId"> <a-input style="width:170px" v-model="record.period" /> <a @click="changeName(record.id,record.name,record.period)">保存</a></span>
+            <span v-else >{{ text }} <a @click="periodId=record.id">编辑</a></span>
+          </template>
+          <span slot="action" slot-scope="record">
+            <template>
+              <a @click="handleView(record)">查看</a>
+              <operation-button
+                v-show="record.status!== 2 && record.status!== 6"
+                @click="handleEdit(record)"
+              >填报</operation-button>
+              <!-- <operation-button
               v-show="record.status == 2"
               @click="handleVerify(record)"
             > 审核</operation-button>
@@ -128,7 +143,7 @@
               v-show="record.status!== 2 && record.status!== 6"
               @click="handleDispatch(record)"
             >转派</operation-button> -->
-            <!-- <operation-button
+              <!-- <operation-button
               v-if="$auth('fill-tasks-overtime')"
               v-show="record.status!== 2 && record.status!== 6"
               @click="handleOvertime(record)"
@@ -144,21 +159,22 @@
               v-show="record.status!== 2 && record.status!==5 && record.status!== 6"
               @click="handlePause(record)"
             >暂停</operation-button> -->
-            <operation-button
-              :type="2"
-              title="是否要删除该条数据?"
-              @confirm="batchDelete(record.id)">删除</operation-button>
-          </template>
-        </span>
-      </s-table>
-    </div>
-    <base-form ref="baseModal" @ok="handleOk" />
-    <dispatch-form ref="dispatchModal" @ok="handleOk" />
-    <overtime-form ref="overtimeModal" @ok="handleOk" />
-    <pause-form ref="pauseModal" @ok="handleOk" />
-    <verify-form ref="verifyModal" @ok="handleOk" />
-    <base-form :editor="false" ref="detailModal" @ok="handleOk" />
-  </a-card>
+              <operation-button
+                :type="2"
+                title="是否要删除该条数据?"
+                @confirm="batchDelete(record.id)">删除</operation-button>
+            </template>
+          </span>
+        </s-table>
+      </div>
+      <base-form ref="baseModal" @ok="handleOk" />
+      <dispatch-form ref="dispatchModal" @ok="handleOk" />
+      <overtime-form ref="overtimeModal" @ok="handleOk" />
+      <pause-form ref="pauseModal" @ok="handleOk" />
+      <verify-form ref="verifyModal" @ok="handleOk" />
+      <base-form :editor="false" ref="detailModal" @ok="handleOk" />
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -203,6 +219,7 @@ export default {
       visible: true,
       nameId: null,
       periodId: null,
+      current: 0,
       // 查询参数
       queryParam: {
         status: this.status
@@ -434,6 +451,7 @@ export default {
     },
     resetSearchForm () {
       this.queryParam = {}
+      this.handleFilter()
       this.$refs.table.refresh(true)
     },
     doExport () {
@@ -454,7 +472,40 @@ export default {
 
         this.$message.info('修改成功!')
       })
+    },
+    handleFilter (key) {
+      this.current = key
+      switch (key) {
+        case 0:
+          this.queryParam.status = null
+          break
+        case 1:
+          this.queryParam.status = 2
+          break
+        case 3:
+          this.queryParam.status = 7
+          break
+      }
+      this.$refs.table.refresh()
     }
   }
 }
 </script>
+<style lang="less" scoped>
+.filter-icon{
+  font-size: 18px;
+  text-align: center;
+  color: #666;
+  cursor: pointer;
+  margin-bottom: 10px;
+  &>:first-child{
+  font-size: 30px;
+}
+&:hover{
+  color: #1890ff;
+}
+}
+.active{
+  color:#1890ff;
+}
+</style>

+ 2 - 8
src/views/hidden/hidden/HiddenDanger.vue

@@ -3,22 +3,16 @@
     <div v-show="visible">
       <div class="table-page-search-wrapper" @keyup.enter="handleEnter">
         <a-form layout="inline">
-          <a-row :gutter="48" v-show="advanced">
+          <a-row :gutter="48" >
             <a-col :md="6" :sm="24">
               <a-form-item label="关键字">
                 <a-input v-model="queryParam.keyword" placeholder="请输入名称/类型名称" />
               </a-form-item>
             </a-col>
-          </a-row>
-          <a-row :gutter="48">
-            <a-col :md="24 || 24" :sm="24" style="text-align: right">
+            <a-col :md="6 || 24" :sm="24" >
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
                 <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
-                <a @click="()=>{ this.advanced = !this.advanced}" style="margin-left: 8px">
-                  {{ advanced ? '收起' : '展开' }}
-                  <a-icon :type="advanced ? 'up' : 'down'" />
-                </a>
               </span>
             </a-col>
           </a-row>

+ 414 - 8
src/views/hidden/hidden/HiddenDangerWait.vue

@@ -1,17 +1,423 @@
 <template>
-  <HiddenDanger :search-type="1"/>
+  <div>
+    <a-space v-show="visible" :size="50">
+      <div class="filter-icon" :class="current===0?'active':''" @click="handleFilter(0)">
+        <a-icon type="file-protect" />
+        <div>隐患</div>
+      </div>
+      <div class="filter-icon" :class="current===1?'active':''" @click="handleFilter(1)">
+        <a-icon type="exception" />
+        <div>延期</div>
+      </div>
+    </a-space>
+    <a-card :bordered="false">
+      <div v-show="visible">
+        <div class="table-page-search-wrapper" @keyup.enter="handleEnter">
+          <a-form layout="inline">
+            <a-row :gutter="48" >
+              <a-col :md="6" :sm="24">
+                <a-form-item label="关键字">
+                  <a-input v-model="queryParam.keyword" placeholder="请输入名称/类型名称" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6 || 24" :sm="24" >
+                <span class="table-page-search-submitButtons">
+                  <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                  <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+                </span>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+
+        <div class="table-operator" style="margin-bottom: 8px;">
+          <a-row>
+            <a-col :md="16">
+              <a-button v-if="$auth('hidden-dangers-add')" type="primary" icon="plus" @click="handleAdd()">新增</a-button>
+              <a-button
+                style="margin-left: 8px"
+                v-if="$auth('hidden-dangers-export')"
+                type="primary"
+                icon="download"
+                @click="doExport">导出
+              </a-button>
+              <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('hidden-dangers-del')">
+                <a-menu slot="overlay">
+                  <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
+                    <a-menu-item key="1">
+                      <a-icon type="delete" />
+                      <a>删除</a></a-menu-item>
+                  </a-popconfirm>
+                </a-menu>
+                <a-button style="margin-left: 8px">
+                  批量操作
+                  <a-icon type="down" />
+                </a-button>
+              </a-dropdown>
+            </a-col>
+          </a-row>
+        </div>
+
+        <s-table
+          ref="table"
+          size="default"
+          rowKey="id"
+          :columns="columns"
+          :data="loadData"
+          :alert="options.alert"
+          :rowSelection="options.rowSelection"
+          :scroll="{x: 1000, y: BaseTool.Constant.scrollY }"
+          showPagination="auto"
+        >
+          <span slot="action" slot-scope="record">
+            <template>
+              <a @click="handleView(record)">查看</a>
+              <operation-button
+                v-if="record.status === 0"
+                @click="handleRepair(record)"
+              >转维修</operation-button>
+              <operation-button
+                v-if="$auth('hidden-hiddens-edit')"
+                @click="handleEdit(record)"
+              >修改</operation-button>
+              <operation-button
+                v-if="record.status === 0"
+                :type="2"
+                title="是否要删除该条数据?"
+                @confirm="batchDelete(record.id)">删除</operation-button>
+            </template>
+          </span>
+          <span slot="professorType" slot-scope="text">
+            <badge :text="BaseTool.Object.getField(professorTypeMap,text)" :status="DictCache.COLOR.HIDDEN_DANGER_COMMON_STATUS[text]"/>
+          </span>
+          <span slot="checkLevel" slot-scope="text">
+            <badge :text="BaseTool.Object.getField(checkLevelMap,text)" :status="DictCache.COLOR.HIDDEN_DANGER_COMMON_STATUS[text]"/>
+          </span>
+          <span slot="status" slot-scope="text">
+            <badge :text="BaseTool.Object.getField(statusMap,text)" :status="DictCache.COLOR.HIDDEN_DANGER_STATUS[text]"/>
+          </span>
+        </s-table>
+      </div>
+      <base-form ref="baseModal" @ok="handleOk" />
+      <detail ref="detailModal" @ok="handleOk" />
+      <RepairBaseForm ref="repairBaseForm" @ok="handleOk" />
+    </a-card>
+  </div>
 </template>
 
 <script>
-import HiddenDanger from './HiddenDanger'
+import { STable, Ellipsis } from '@/components'
+import BaseForm from './modules/BaseForm'
+import Detail from './modules/Detail'
+import RepairBaseForm from './modules/RepairBaseForm'
+
+import { getHiddenDangerPage, deleteHiddenDangers, fetchHiddenDanger, exportHiddenDanger } from '@/api/hidden/hidden-danger'
+
 export default {
-  name: 'HiddenDangerWait',
+  name: 'HiddenDanger',
   components: {
-    HiddenDanger
+    STable,
+    Ellipsis,
+    BaseForm,
+    Detail,
+    RepairBaseForm
+  },
+  data () {
+    return {
+      advanced: false,
+      visible: true,
+      // 查询参数
+      queryParam: {
+      },
+      current: 0,
+      searchType: 1,
+      professorTypeMap: {},
+      checkLevelMap: {},
+      statusMap: {},
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          checked: true,
+          width: '70px',
+          customRender: (text, record, index) => {
+            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+          }
+        },
+        {
+          title: '检查区域',
+          checked: true,
+          width: '150px',
+          dataIndex: 'positionName'
+        },
+        {
+          title: '设备位号',
+          checked: true,
+          width: '150px',
+          dataIndex: 'positionNo'
+        },
+        {
+          title: '设备',
+          checked: true,
+          width: '150px',
+          dataIndex: 'sbName'
+        },
+        {
+          title: '存在问题',
+          width: '150px',
+          checked: true,
+          dataIndex: 'existsQuestion'
+        },
+        {
+          title: '可能风险',
+          width: '150px',
+          checked: true,
+          dataIndex: 'hiddenRisk'
+        },
+        {
+          title: '整改建议',
+          width: '150px',
+          checked: true,
+          dataIndex: 'opition'
+        },
+        {
+          title: '整改责任人',
+          width: '150px',
+          checked: true,
+          dataIndex: 'dutyUserName'
+        },
+        {
+          title: '属地负责人',
+          width: '150px',
+          checked: true,
+          dataIndex: 'areaUserName'
+        },
+        {
+          title: '备注',
+          width: '150px',
+          checked: true,
+          dataIndex: 'remark'
+        },
+        {
+          title: '添加人',
+          width: '150px',
+          checked: true,
+          dataIndex: 'createdUserName'
+        },
+        {
+          title: '专业类型',
+          width: '150px',
+          checked: true,
+          dataIndex: 'professorType',
+          scopedSlots: { customRender: 'professorType' }
+        },
+        {
+          title: '检查级别',
+          width: '150px',
+          checked: true,
+          dataIndex: 'checkLevel',
+          scopedSlots: { customRender: 'checkLevel' }
+        },
+        {
+          title: '整改时限',
+          width: '150px',
+          checked: true,
+          dataIndex: 'requireTime'
+        },
+        {
+          title: '添加时间',
+          width: '150px',
+          checked: true,
+          dataIndex: 'createdTime'
+        },
+        {
+          title: '状态',
+          width: '150px',
+          checked: true,
+          fixed: 'right',
+          dataIndex: 'status',
+          scopedSlots: { customRender: 'status' }
+        },
+        {
+          title: '操作',
+          key: 'action',
+          width: '200px',
+          checked: true,
+          fixed: 'right',
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      // 下拉框map
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          searchType: this.searchType,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'created_time'
+          }
+        }
+        return getHiddenDangerPage(Object.assign(parameter, this.queryParam))
+          .then(res => {
+            return res.data
+          })
+      },
+      selectedRowKeys: [],
+      selectedRows: [],
+
+      options: {
+        alert: {
+          show: true,
+          clear: () => {
+            this.selectedRowKeys = []
+          }
+        },
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys,
+          onChange: this.onSelectChange
+        }
+      },
+      optionAlertShow: false
+    }
+  },
+  created () {
+    // 下拉框map
+    this.tableOption()
+    this.professorTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PROFESSOR_TYPE)
+    this.checkLevelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_LEVEL)
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.HIDDEN_DANGER_STATUS)
+  },
+  methods: {
+    tableOption () {
+      if (!this.optionAlertShow) {
+        this.options = {
+          alert: {
+            show: true,
+            clear: () => {
+              this.selectedRowKeys = []
+            }
+          },
+          rowSelection: {
+            selectedRowKeys: this.selectedRowKeys,
+            onChange: this.onSelectChange,
+            getCheckboxProps: record => ({
+              props: {
+                disabled: false,
+                name: record.id
+              }
+            })
+          }
+        }
+        this.optionAlertShow = true
+      } else {
+        this.options = {
+          alert: false,
+          rowSelection: null
+        }
+        this.optionAlertShow = false
+      }
+    },
+    batchDelete (id) {
+      let ids = []
+      if (this.BaseTool.String.isBlank(id)) {
+        const length = this.selectedRows.length
+        if (length === 0) {
+          this.$message.info('请选择要删除的记录')
+          return
+        }
+        ids = this.selectedRows.map(item => item.id)
+      } else {
+        ids = [id]
+      }
+      deleteHiddenDangers(ids).then(res => {
+        this.$message.info('删除成功')
+        this.handleOk()
+        this.$refs.table.clearSelected()
+      })
+    },
+    handleAdd () {
+      this.visible = false
+      const modal = this.$refs.baseModal
+      modal.base()
+    },
+    handleEdit (record) {
+      this.visible = false
+      fetchHiddenDanger({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    handleRepair (record) {
+      fetchHiddenDanger({ id: record.id }).then(res => {
+        const modal = this.$refs.repairBaseForm
+        modal.base(res.data)
+      })
+    },
+    handleView (record) {
+      this.visible = false
+      fetchHiddenDanger({ id: record.id }).then(res => {
+        const modal = this.$refs.detailModal
+        modal.base(res.data)
+      })
+    },
+    handleOk (values) {
+      this.visible = true
+      this.$refs.table.refresh()
+    },
+    onSelectChange (selectedRowKeys, selectedRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRows = selectedRows
+    },
+    resetSearchForm () {
+      this.queryParam = {}
+      this.handleFilter()
+      this.$refs.table.refresh(true)
+    },
+    doExport () {
+      const parameter = {
+        ...this.queryParam
+      }
+      exportHiddenDanger(parameter).then(file => {
+        this.BaseTool.Util.downLoadExportExcel(file)
+      })
+    },
+    handleEnter () {
+      this.$refs.table.refresh(true)
+    },
+    handleFilter (key) {
+      this.current = key
+      switch (key) {
+        case 0:
+          this.searchType = 1
+          break
+        case 1:
+          this.searchType = 2
+          break
+      }
+      this.$refs.table.refresh()
+    }
   }
 }
 </script>
-
-<style scoped>
-
-</style>
+<style lang="less" scoped>
+.filter-icon{
+  font-size: 18px;
+  text-align: center;
+  color: #666;
+  cursor: pointer;
+  margin-bottom: 10px;
+  &>:first-child{
+  font-size: 30px;
+}
+&:hover{
+  color: #1890ff;
+}
+}
+.active{
+  color:#1890ff;
+}
+</style>

+ 12 - 12
src/views/repair/application-form/RepairForm.vue

@@ -5,14 +5,10 @@
         <a-icon type="file-protect" />
         <div>全部工单</div>
       </div>
-      <div class="filter-icon" :class="current===1?'active':''" @click="handleFilter(1)">
+      <!-- <div class="filter-icon" :class="current===1?'active':''" @click="handleFilter(1)">
         <a-icon type="exception" />
         <div>接单大厅</div>
-      </div>
-      <div class="filter-icon" :class="current===2?'active':''" @click="handleFilter(2)">
-        <a-icon type="exception" />
-        <div>我的工单</div>
-      </div>
+      </div> -->
       <div class="filter-icon" :class="current===3?'active':''" @click="handleFilter(3)">
         <a-icon type="exception" />
         <div>待接工单</div>
@@ -21,22 +17,26 @@
         <a-icon type="exception" />
         <div>待派工单</div>
       </div>
-      <div class="filter-icon" :class="current===5?'active':''" @click="handleFilter(5)">
+      <div class="filter-icon" :class="current===2?'active':''" @click="handleFilter(2)">
         <a-icon type="exception" />
-        <div>撤回工单</div>
+        <div>我的工单</div>
       </div>
+      <!-- <div class="filter-icon" :class="current===5?'active':''" @click="handleFilter(5)">
+        <a-icon type="exception" />
+        <div>撤回工单</div>
+      </div> -->
       <div class="filter-icon" :class="current===6?'active':''" @click="handleFilter(6)">
         <a-icon type="exception" />
         <div>上报工单</div>
       </div>
-      <div class="filter-icon" :class="current===7?'active':''" @click="handleFilter(7)">
-        <a-icon type="exception" />
-        <div>关闭工单</div>
-      </div>
       <div class="filter-icon" :class="current===8?'active':''" @click="handleFilter(8)">
         <a-icon type="exception" />
         <div>我的审核</div>
       </div>
+      <div class="filter-icon" :class="current===7?'active':''" @click="handleFilter(7)">
+        <a-icon type="exception" />
+        <div>待审工单</div>
+      </div>
     </a-space>
     <a-card v-show="visible">
       <div class="table-page-search-wrapper">