调整到报送列表
This commit is contained in:
parent
13303b884b
commit
2493758943
|
|
@ -139,14 +139,7 @@ export const asyncRoutes = [
|
||||||
path: 'record',
|
path: 'record',
|
||||||
name: 'Record',
|
name: 'Record',
|
||||||
component: () => import('@/views/supervision/record.vue'),
|
component: () => import('@/views/supervision/record.vue'),
|
||||||
meta: { title: '材料列表', icon: 'guide', perms: ['record_all'] }
|
meta: { title: '材料报送列表', icon: 'guide', perms: ['record_view'] }
|
||||||
}
|
|
||||||
,
|
|
||||||
{
|
|
||||||
path: 'report',
|
|
||||||
name: 'Report',
|
|
||||||
component: () => import('@/views/supervision/report.vue'),
|
|
||||||
meta: { title: '材料报送', icon: 'guide', perms: ['record_view'] }
|
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -95,29 +95,15 @@ const actions = {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getInfo(state.token).then(response => {
|
getInfo(state.token).then(response => {
|
||||||
const { data } = response
|
const { data } = response
|
||||||
if(data){
|
const { perms, name, avatar } = data
|
||||||
const { perms, name, avatar } = data
|
// perms must be a non-empty array
|
||||||
// perms must be a non-empty array
|
if (!perms || perms.length <= 0) {
|
||||||
if (!perms || perms.length <= 0) {
|
reject('没有任何权限!')
|
||||||
reject('没有任何权限!')
|
|
||||||
}
|
|
||||||
commit('SET_PERMS', perms)
|
|
||||||
commit('SET_NAME', name)
|
|
||||||
commit('SET_AVATAR', avatar)
|
|
||||||
resolve(data)
|
|
||||||
}else{
|
|
||||||
getInfo(state.token).then(res=>{
|
|
||||||
const { data } = response
|
|
||||||
if (!perms || perms.length <= 0) {
|
|
||||||
reject('没有任何权限!')
|
|
||||||
}
|
|
||||||
commit('SET_PERMS', perms)
|
|
||||||
commit('SET_NAME', name)
|
|
||||||
commit('SET_AVATAR', avatar)
|
|
||||||
resolve(data)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
commit('SET_PERMS', perms)
|
||||||
|
commit('SET_NAME', name)
|
||||||
|
commit('SET_AVATAR', avatar)
|
||||||
|
resolve(data)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="resetFilter"
|
@click="resetFilter"
|
||||||
>刷新</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="resetFilter"
|
@click="resetFilter"
|
||||||
>刷新</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="resetFilter"
|
@click="resetFilter"
|
||||||
>刷新</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="resetFilter"
|
@click="resetFilter"
|
||||||
>刷新</el-button>
|
>重置</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div style="margin-top:10px">
|
<div style="margin-top:10px">
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="resetFilter"
|
@click="resetFilter"
|
||||||
>刷新重置</el-button>
|
>重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>待办任务提醒</span>
|
<span>待办任务提醒</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="litem" @click="goto('toup')">
|
<div class="litem" @click="goRecord('待上报')" v-if="!checkPermission(['record_confirm'])">
|
||||||
<el-link class="desc">
|
<el-link class="desc">
|
||||||
您有
|
您有
|
||||||
<span style="color:red">{{todos.toup}}</span>
|
<span style="color:red">{{todos.toup}}</span>
|
||||||
|
|
@ -66,13 +66,13 @@
|
||||||
</el-link>
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="litem">
|
<div class="litem">
|
||||||
<el-link class="desc" @click="goto('tozg')">
|
<el-link class="desc" @click="goRecord('待整改')" v-if="!checkPermission(['record_confirm'])">
|
||||||
您有
|
您有
|
||||||
<span style="color:red">{{todos.tozg}}</span>
|
<span style="color:red">{{todos.tozg}}</span>
|
||||||
条记录待整改
|
条记录待整改
|
||||||
</el-link>
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
<div class="litem" @click="goto('uped')">
|
<div class="litem" @click="goRecord('已上报')">
|
||||||
<el-link class="desc" v-if="todos.toconfirm">
|
<el-link class="desc" v-if="todos.toconfirm">
|
||||||
您有
|
您有
|
||||||
<span style="color:red">{{todos.toconfirm}}</span>
|
<span style="color:red">{{todos.toconfirm}}</span>
|
||||||
|
|
@ -88,6 +88,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { getRecordtodos } from "@/api/todos"
|
import { getRecordtodos } from "@/api/todos"
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
export default {
|
export default {
|
||||||
name: 'Dashboard',
|
name: 'Dashboard',
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -105,6 +106,7 @@ export default {
|
||||||
this.gettodos()
|
this.gettodos()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
checkPermission,
|
||||||
toPath(val) {
|
toPath(val) {
|
||||||
this.$router.push({path:val})
|
this.$router.push({path:val})
|
||||||
},
|
},
|
||||||
|
|
@ -113,8 +115,8 @@ export default {
|
||||||
this.todos = res.data
|
this.todos = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goto(tab){
|
goRecord(state){
|
||||||
this.$router.push({name: "Report", params: { tab: tab }, })
|
this.$router.push({name:'Record', params: {state:state}})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,186 +1,219 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card
|
<el-card style="margin-top: 10px">
|
||||||
style="margin-top: 10px"
|
<div>
|
||||||
>
|
<el-input
|
||||||
<div>
|
v-model="listQuery.content_name"
|
||||||
<el-input
|
placeholder="材料名称"
|
||||||
v-model="listQuery.content_name"
|
style="width: 200px"
|
||||||
placeholder="材料名称"
|
class="filter-item"
|
||||||
style="width: 200px"
|
@keyup.enter.native="handleFilter"
|
||||||
class="filter-item"
|
/>
|
||||||
@keyup.enter.native="handleFilter"
|
|
||||||
/>
|
<el-select
|
||||||
|
v-model="listQuery.state"
|
||||||
|
placeholder="记录状态"
|
||||||
|
clearable
|
||||||
<el-select
|
style="width: 140px"
|
||||||
v-model="listQuery.state"
|
class="filter-item"
|
||||||
placeholder="记录状态"
|
@change="handleFilter"
|
||||||
clearable
|
>
|
||||||
style="width:140px"
|
<el-option
|
||||||
class="filter-item"
|
v-for="item in stateOptions"
|
||||||
@change="handleFilter"
|
:key="item.key"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.key"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
<el-select
|
||||||
|
v-model="listQuery.belong_dept"
|
||||||
|
placeholder="上报部门"
|
||||||
|
clearable
|
||||||
|
style="width: 140px"
|
||||||
|
class="filter-item"
|
||||||
|
@change="handleFilter"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in orgData"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="listQuery.date_gt"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="上报时间"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
-
|
||||||
|
<el-date-picker
|
||||||
|
v-model="listQuery.date_lt"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
@change="handleFilter"
|
||||||
|
placeholder="上报时间"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleFilter"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-refresh-left"
|
||||||
|
@click="resetFilter"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="margin-top: 10px">
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="recordList.results"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
max-height="600"
|
||||||
|
:default-sort="{ prop: 'date', order: 'descending' }"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
|
<el-table-column label="任务标题">
|
||||||
|
<template slot-scope="scope" v-if="scope.row.task">{{
|
||||||
|
scope.row.task_.name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="材料名称">
|
||||||
|
<template slot-scope="scope">{{ scope.row.content_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column sortable label="上报时间">
|
||||||
|
<template slot-scope="scope">{{ scope.row.up_date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上报人">
|
||||||
|
<template slot-scope="scope" v-if="scope.row.up_user">{{
|
||||||
|
scope.row.up_user_.name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column sortable label="截止时间">
|
||||||
|
<template slot-scope="scope">{{ scope.row.end_date }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="上报备注">
|
||||||
|
<template slot-scope="scope">{{ scope.row.note }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上报说明">
|
||||||
|
<template slot-scope="scope">{{ scope.row.noteb }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="上报单位">
|
||||||
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.belong_dept_.name
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="记录状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag type="danger" v-if="scope.row.state == '待上报'">{{
|
||||||
|
scope.row.state
|
||||||
|
}}</el-tag>
|
||||||
|
<el-tag type="warning" v-else-if="scope.row.state == '待整改'">{{
|
||||||
|
scope.row.state
|
||||||
|
}}</el-tag>
|
||||||
|
<el-tag type="success" v-else-if="scope.row.state == '已确认'">{{
|
||||||
|
scope.row.state
|
||||||
|
}}</el-tag>
|
||||||
|
<el-tag v-else-if="scope.row.state == '已上报'">{{
|
||||||
|
scope.row.state
|
||||||
|
}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上报文件">
|
||||||
|
<template slot-scope="scope" v-if="scope.row.files">
|
||||||
|
<el-link
|
||||||
|
v-if="scope.row.files.length > 1"
|
||||||
|
@click="handleRecord({ action: 'view', record: scope.row })"
|
||||||
|
>有
|
||||||
|
<span style="color: red">{{ scope.row.files.length }}</span>
|
||||||
|
个文件</el-link
|
||||||
>
|
>
|
||||||
<el-option
|
<div v-else v-for="item in scope.row.files_" v-bind:key="item.id">
|
||||||
v-for="item in stateOptions"
|
<el-link :href="item.path" target="_blank" type="primary">{{
|
||||||
:key="item.key"
|
item.name
|
||||||
:label="item.name"
|
}}</el-link>
|
||||||
:value="item.key"
|
</div>
|
||||||
/>
|
</template>
|
||||||
</el-select>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
<el-select
|
align="center"
|
||||||
v-model="listQuery.belong_dept"
|
label="操作"
|
||||||
placeholder="上报部门"
|
width="220px"
|
||||||
clearable
|
fixed="right"
|
||||||
style="width:140px"
|
>
|
||||||
class="filter-item"
|
<template slot-scope="scope">
|
||||||
@change="handleFilter"
|
<el-button
|
||||||
|
v-if="
|
||||||
|
scope.row.state == '待上报' &&
|
||||||
|
checkPermission(['record_update'])
|
||||||
|
"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="handleRecord({ action: 'update', record: scope.row })"
|
||||||
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
<el-option
|
<el-button
|
||||||
v-for="item in orgData"
|
v-if="
|
||||||
:key="item.id"
|
(scope.row.state == '待上报' || scope.row.state == '待整改') &&
|
||||||
:label="item.name"
|
checkPermission(['record_up'])
|
||||||
:value="item.id"
|
"
|
||||||
/>
|
type="primary"
|
||||||
</el-select>
|
size="small"
|
||||||
<el-date-picker
|
@click="handleRecord({ action: 'up', record: scope.row })"
|
||||||
v-model="listQuery.date_gt"
|
>上报</el-button
|
||||||
type="date"
|
>
|
||||||
value-format="yyyy-MM-dd"
|
<el-button
|
||||||
placeholder="上报时间">
|
v-if="
|
||||||
</el-date-picker>
|
scope.row.state == '已上报' &&
|
||||||
<el-date-picker
|
checkPermission(['record_confirm'])
|
||||||
v-model="listQuery.date_lt"
|
"
|
||||||
type="date"
|
type="primary"
|
||||||
value-format="yyyy-MM-dd"
|
size="small"
|
||||||
@change="handleFilter"
|
@click="handleRecord({ action: 'confirm', record: scope.row })"
|
||||||
placeholder="上报时间">
|
>确认</el-button
|
||||||
</el-date-picker>
|
>
|
||||||
</div>
|
<el-button
|
||||||
</el-card>
|
v-if="
|
||||||
<el-card
|
scope.row.state == '已上报' &&
|
||||||
style="margin-top: 10px"
|
checkPermission(['record_reject'])
|
||||||
>
|
"
|
||||||
<el-table
|
type="danger"
|
||||||
v-loading="listLoading"
|
size="small"
|
||||||
:data="recordList.results"
|
@click="handleRecord({ action: 'reject', record: scope.row })"
|
||||||
border
|
>驳回</el-button
|
||||||
fit
|
>
|
||||||
stripe
|
<el-button
|
||||||
highlight-current-row
|
v-if="checkPermission(['record_view'])"
|
||||||
max-height="600"
|
size="small"
|
||||||
:default-sort = "{prop: 'date', order: 'descending'}"
|
@click="handleRecord({ action: 'view', record: scope.row })"
|
||||||
>
|
>查看</el-button
|
||||||
<el-table-column type="index" width="50" />
|
>
|
||||||
|
</template>
|
||||||
<el-table-column label="任务标题">
|
</el-table-column>
|
||||||
<template slot-scope="scope" v-if="scope.row.task">{{ scope.row.task_.name }}</template>
|
</el-table>
|
||||||
</el-table-column>
|
<pagination
|
||||||
<el-table-column label="材料名称">
|
|
||||||
<template slot-scope="scope" >{{ scope.row.content_.name }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column sortable label="上报时间">
|
|
||||||
<template slot-scope="scope" >{{ scope.row.up_date }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="上报人" >
|
|
||||||
<template slot-scope="scope" v-if="scope.row.up_user">{{ scope.row.up_user_.name }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column sortable label="截止时间">
|
|
||||||
<template slot-scope="scope">{{ scope.row.end_date }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column label="上报备注">
|
|
||||||
<template slot-scope="scope">{{ scope.row.note }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="上报说明">
|
|
||||||
<template slot-scope="scope">{{ scope.row.noteb }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="上报单位">
|
|
||||||
<template slot-scope="scope" >{{ scope.row.belong_dept_.name }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="记录状态">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag type="danger" v-if="scope.row.state == '待上报'">{{ scope.row.state }}</el-tag>
|
|
||||||
<el-tag type="warning" v-else-if="scope.row.state == '待整改'">{{ scope.row.state }}</el-tag>
|
|
||||||
<el-tag type="success" v-else-if="scope.row.state == '已确认'">{{ scope.row.state }}</el-tag>
|
|
||||||
<el-tag v-else-if="scope.row.state == '已上报'">{{ scope.row.state }}</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="上报文件">
|
|
||||||
|
|
||||||
<template slot-scope="scope" v-if="scope.row.files">
|
|
||||||
<el-link v-if="scope.row.files.length>1" @click="handleRecord({action:'view', record:scope.row})">有
|
|
||||||
<span style="color:red">{{scope.row.files.length}}</span>
|
|
||||||
个文件</el-link>
|
|
||||||
<div v-else v-for="item in scope.row.files_" v-bind:key="item.id">
|
|
||||||
<el-link :href="item.path" target="_blank" type="primary">{{ item.name }}</el-link>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" label="操作" width="220px" fixed="right">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
v-if="
|
|
||||||
scope.row.state == '待上报' &&
|
|
||||||
checkPermission(['record_update'])
|
|
||||||
"
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="handleRecord({action:'update', record:scope.row})"
|
|
||||||
>编辑</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
v-if="
|
|
||||||
(scope.row.state == '待上报' || scope.row.state == '待整改')&&
|
|
||||||
checkPermission(['record_up'])
|
|
||||||
"
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="handleRecord({action:'up', record:scope.row})"
|
|
||||||
>上报</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
v-if="
|
|
||||||
scope.row.state == '已上报' &&
|
|
||||||
checkPermission(['record_confirm'])
|
|
||||||
"
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="handleRecord({action:'confirm', record:scope.row})"
|
|
||||||
>确认</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
v-if="
|
|
||||||
scope.row.state == '已上报' &&
|
|
||||||
checkPermission(['record_reject'])
|
|
||||||
"
|
|
||||||
type="danger"
|
|
||||||
size="small"
|
|
||||||
@click="handleRecord({action:'reject', record:scope.row})"
|
|
||||||
>驳回</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
v-if="checkPermission(['record_view'])"
|
|
||||||
size="small"
|
|
||||||
@click="handleRecord({action:'view', record:scope.row})"
|
|
||||||
>查看</el-button
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<pagination
|
|
||||||
v-show="recordList.count > 0"
|
v-show="recordList.count > 0"
|
||||||
:total="recordList.count"
|
:total="recordList.count"
|
||||||
:page.sync="listQuery.page"
|
:page.sync="listQuery.page"
|
||||||
:limit.sync="listQuery.page_size"
|
:limit.sync="listQuery.page_size"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-drawer title="记录" :visible.sync="drawer" :with-header="false">
|
<el-drawer title="记录" :visible.sync="drawer" :with-header="false">
|
||||||
<recorddo
|
<recorddo
|
||||||
ref="recorddo"
|
ref="recorddo"
|
||||||
:data="data"
|
:data="data"
|
||||||
|
|
@ -192,59 +225,62 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getOrgList } from "@/api/org";
|
import { getOrgList } from "@/api/org";
|
||||||
import {getRecordList} from "@/api/record";
|
import { getRecordList } from "@/api/record";
|
||||||
import { genTree } from "@/utils";
|
import { genTree } from "@/utils";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
import recorddo from "@/views/supervision/recorddo";
|
import recorddo from "@/views/supervision/recorddo";
|
||||||
const defaultrecord = {
|
const defaultrecord = {
|
||||||
name: ""
|
name: "",
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination, recorddo },
|
components: { Pagination, recorddo },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
record: defaultrecord,
|
record: defaultrecord,
|
||||||
recordList: {
|
recordList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
orgData: [],
|
orgData: [],
|
||||||
drawer:false,
|
drawer: false,
|
||||||
stateOptions: [
|
stateOptions: [
|
||||||
{ key: "待上报", name: "待上报" },
|
{ key: "待上报", name: "待上报" },
|
||||||
{ key: "已上报", name: "已上报" },
|
{ key: "已上报", name: "已上报" },
|
||||||
{ key: "已确认", name: "已确认" },
|
{ key: "已确认", name: "已确认" },
|
||||||
{ key: "待整改", name: "待整改" },
|
{ key: "待整改", name: "待整改" },
|
||||||
],
|
],
|
||||||
pickerOptions2: {
|
pickerOptions2: {
|
||||||
shortcuts: [{
|
shortcuts: [
|
||||||
text: '最近一周',
|
{
|
||||||
|
text: "最近一周",
|
||||||
onClick(picker) {
|
onClick(picker) {
|
||||||
const end = new Date();
|
const end = new Date();
|
||||||
const start = new Date();
|
const start = new Date();
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
picker.$emit('pick', [start, end]);
|
picker.$emit("pick", [start, end]);
|
||||||
}
|
},
|
||||||
}, {
|
},
|
||||||
text: '最近一个月',
|
{
|
||||||
|
text: "最近一个月",
|
||||||
onClick(picker) {
|
onClick(picker) {
|
||||||
const end = new Date();
|
const end = new Date();
|
||||||
const start = new Date();
|
const start = new Date();
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||||
picker.$emit('pick', [start, end]);
|
picker.$emit("pick", [start, end]);
|
||||||
}
|
},
|
||||||
}, {
|
},
|
||||||
text: '最近三个月',
|
{
|
||||||
|
text: "最近三个月",
|
||||||
onClick(picker) {
|
onClick(picker) {
|
||||||
const end = new Date();
|
const end = new Date();
|
||||||
const start = new Date();
|
const start = new Date();
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||||
picker.$emit('pick', [start, end]);
|
picker.$emit("pick", [start, end]);
|
||||||
}
|
},
|
||||||
}]
|
},
|
||||||
},
|
],
|
||||||
value7: '',
|
},
|
||||||
listQuery: {
|
listQuery: {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
|
|
@ -253,42 +289,41 @@ export default {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
rule1: {
|
rule1: {
|
||||||
name: [{ required: true, message: "请输入", trigger: "blur" }]
|
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
watch: {
|
watch: {},
|
||||||
},
|
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getState();
|
||||||
this.getOrgList();
|
this.getOrgList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
getList(){
|
getState(){
|
||||||
|
if(this.$route.params.state){
|
||||||
getRecordList(this.listQuery).then((response)=>{
|
this.listQuery.state = this.$route.params.state
|
||||||
|
}
|
||||||
this.recordList=response.data
|
this.getList()
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
})
|
getRecordList(this.listQuery).then((response) => {
|
||||||
}
|
this.recordList = response.data;
|
||||||
,
|
|
||||||
getOrgList() {
|
|
||||||
getOrgList({ pid: 1 }).then((res) => {
|
|
||||||
this.orgData = genTree(res.data)
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getOrgList() {
|
||||||
|
getOrgList({ pid: 1 }).then((res) => {
|
||||||
|
this.orgData = genTree(res.data);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
handleOrgClick(obj, node, vue) {
|
handleOrgClick(obj, node, vue) {
|
||||||
this.listQuery.page = 1;
|
this.listQuery.page = 1;
|
||||||
this.listQuery.dept_id = obj.id;
|
this.listQuery.dept_id = obj.id;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
handleFilter() {
|
handleFilter() {
|
||||||
|
|
||||||
this.listQuery.page = 1;
|
this.listQuery.page = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
|
@ -296,15 +331,18 @@ export default {
|
||||||
this.listQuery = {
|
this.listQuery = {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
}
|
};
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
|
||||||
handleRecord(data){
|
handleRecord(data) {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.drawer = true;
|
this.drawer = true;
|
||||||
},
|
},
|
||||||
|
handleDo(data) {
|
||||||
|
this.drawer = false;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="resetFilter"
|
@click="resetFilter"
|
||||||
>刷新重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px">
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="resetFilter"
|
@click="resetFilter"
|
||||||
>刷新重置</el-button>
|
>重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="resetFilter"
|
@click="resetFilter"
|
||||||
>刷新重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 10px">
|
<div style="margin-top: 10px">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue