|
@@ -1,125 +1,140 @@
|
|
<template>
|
|
<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-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">
|
|
<!-- <a @click="()=>{ this.advanced = !this.advanced}" style="margin-left: 8px">
|
|
{{ advanced ? '收起' : '展开' }}
|
|
{{ advanced ? '收起' : '展开' }}
|
|
<a-icon :type="advanced ? 'up' : 'down'" />
|
|
<a-icon :type="advanced ? 'up' : 'down'" />
|
|
</a> -->
|
|
</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-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"
|
|
v-show="record.status == 2"
|
|
@click="handleVerify(record)"
|
|
@click="handleVerify(record)"
|
|
> 审核</operation-button>
|
|
> 审核</operation-button>
|
|
@@ -128,7 +143,7 @@
|
|
v-show="record.status!== 2 && record.status!== 6"
|
|
v-show="record.status!== 2 && record.status!== 6"
|
|
@click="handleDispatch(record)"
|
|
@click="handleDispatch(record)"
|
|
>转派</operation-button> -->
|
|
>转派</operation-button> -->
|
|
- <!-- <operation-button
|
|
|
|
|
|
+ <!-- <operation-button
|
|
v-if="$auth('fill-tasks-overtime')"
|
|
v-if="$auth('fill-tasks-overtime')"
|
|
v-show="record.status!== 2 && record.status!== 6"
|
|
v-show="record.status!== 2 && record.status!== 6"
|
|
@click="handleOvertime(record)"
|
|
@click="handleOvertime(record)"
|
|
@@ -144,21 +159,22 @@
|
|
v-show="record.status!== 2 && record.status!==5 && record.status!== 6"
|
|
v-show="record.status!== 2 && record.status!==5 && record.status!== 6"
|
|
@click="handlePause(record)"
|
|
@click="handlePause(record)"
|
|
>暂停</operation-button> -->
|
|
>暂停</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>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -203,6 +219,7 @@ export default {
|
|
visible: true,
|
|
visible: true,
|
|
nameId: null,
|
|
nameId: null,
|
|
periodId: null,
|
|
periodId: null,
|
|
|
|
+ current: 0,
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParam: {
|
|
queryParam: {
|
|
status: this.status
|
|
status: this.status
|
|
@@ -434,6 +451,7 @@ export default {
|
|
},
|
|
},
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam = {}
|
|
this.queryParam = {}
|
|
|
|
+ this.handleFilter()
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
doExport () {
|
|
doExport () {
|
|
@@ -454,7 +472,40 @@ export default {
|
|
|
|
|
|
this.$message.info('修改成功!')
|
|
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>
|
|
</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>
|