|
@@ -0,0 +1,339 @@
|
|
|
+<template>
|
|
|
+ <div class="page">
|
|
|
+ <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
|
|
|
+ <!-- 搜索框-->
|
|
|
+ <el-form-item label="项目名称" prop="cwProjectRecordsDTO.projectName">
|
|
|
+ <el-input size="small" v-model="searchForm.cwProjectRecordsDTO.projectName" placeholder="请输入项目名称" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="创建人" prop="projectMasterId">
|
|
|
+ <SelectUserTree
|
|
|
+ ref="companyTree"
|
|
|
+ :props="{
|
|
|
+ value: 'id', // ID字段名
|
|
|
+ label: 'name', // 显示名称
|
|
|
+ children: 'children' // 子级字段名
|
|
|
+ }"
|
|
|
+ :url="`/sys/user/treeUserDataAllOffice?type=2`"
|
|
|
+ :value="searchForm.cwProjectRecordsDTO.projectMasterId"
|
|
|
+ :clearable="true"
|
|
|
+ :accordion="true"
|
|
|
+ @getValue="(value) => {searchForm.cwProjectRecordsDTO.projectMasterId=value}"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="案卷号" prop="number">
|
|
|
+ <el-input size="small" v-model="searchForm.number" placeholder="请输入案卷号" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="报告文号" prop="reportNo">
|
|
|
+ <el-input size="small" v-model="searchForm.reportNo" placeholder="请输入报告文号" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="报告时间" prop="reportDates">
|
|
|
+ <el-date-picker
|
|
|
+ placement="bottom-start"
|
|
|
+ format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ v-model="searchForm.reportDates"
|
|
|
+ type="datetimerange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ clearable>
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="归档时间" prop="auditDates">
|
|
|
+ <el-date-picker
|
|
|
+ placement="bottom-start"
|
|
|
+ format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ v-model="searchForm.auditDates"
|
|
|
+ type="datetimerange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ clearable>
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+
|
|
|
+ <el-form-item label="归档状态" prop="status">
|
|
|
+ <el-select v-model="searchForm.status" placeholder="请选择归档状态" clearable style="width: 100%">
|
|
|
+ <el-option-group
|
|
|
+ v-for="(type,index) in typeDictList"
|
|
|
+ :key="type.key"
|
|
|
+ :label="type.label">
|
|
|
+ <el-option
|
|
|
+ v-for="item in typeDictList[index].childrenList"
|
|
|
+ :key="item.key"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-option-group>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
|
|
|
+ <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="bg-white top" style="">
|
|
|
+ <vxe-toolbar :refresh="{query: refreshList}" export print custom>
|
|
|
+ </vxe-toolbar>
|
|
|
+ <div style="height: calc(100% - 90px)">
|
|
|
+ <vxe-table
|
|
|
+ border="inner"
|
|
|
+ auto-resize
|
|
|
+ resizable
|
|
|
+ height="auto"
|
|
|
+ :loading="loading"
|
|
|
+ size="small"
|
|
|
+ ref="projectTable"
|
|
|
+ show-header-overflow
|
|
|
+ show-overflow
|
|
|
+ highlight-hover-row
|
|
|
+ :print-config="{}"
|
|
|
+ :export-config="{
|
|
|
+ remote: true,
|
|
|
+ filename: `归档信息${moment(new Date()).format('YYYY-MM-DD')}`,
|
|
|
+ sheetName: '归档信息',
|
|
|
+ exportMethod: exportMethod,
|
|
|
+ types: ['xlsx'],
|
|
|
+ modes: ['current', 'selected', 'all']
|
|
|
+ }"
|
|
|
+ :menu-config="{}"
|
|
|
+ @sort-change="sortChangeHandle"
|
|
|
+ :sort-config="{remote:true}"
|
|
|
+ :data="dataList"
|
|
|
+ :checkbox-config="{}">
|
|
|
+ <vxe-column type="seq" width="60" title="序号"></vxe-column>
|
|
|
+ <vxe-column min-width="230" align="center" title="项目名称" field="cwProjectRecordsDTO.projectName">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link type="primary" :underline="false" v-if="hasPermission('cwProjectRecords:view')" @click="viewProject(scope.row.projectId)">{{commonJS.isNotEmpty(scope.row.cwProjectRecordsDTO)?scope.row.cwProjectRecordsDTO.projectName:''}}</el-link>
|
|
|
+ <span v-else>{{commonJS.isNotEmpty(scope.row.cwProjectRecordsDTO)?scope.row.cwProjectRecordsDTO.projectName:''}}</span>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column min-width="150" align="center" title="项目经理" field="cwProjectRecordsDTO.projectMasterName"></vxe-column>
|
|
|
+ <vxe-column min-width="230" align="center" title="报告文号" field="reportNo"></vxe-column>
|
|
|
+ <vxe-column min-width="150" align="center" title="报告日期" :formatter="formatDate" field="reportDate"></vxe-column>
|
|
|
+ <vxe-column min-width="150" align="center" title="归档日期" :formatter="formatDate" field="auditDate"></vxe-column>
|
|
|
+ <vxe-column min-width="150" align="center" title="归档状态" field="status">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span style="color:#5bc0de; font-weight: bold;" v-if="scope.row.status === '暂时未归档'">暂时未归档</span>
|
|
|
+ <span style="color:#de6764; font-weight: bold;" v-if="scope.row.status === '超期未归档'">超期未归档</span>
|
|
|
+ <span style="color:#5cb85c; font-weight: bold;" v-if="scope.row.status === '已按时归档'">已按时归档</span>
|
|
|
+ <span style="color:#f0ad4e; font-weight: bold;" v-if="scope.row.status === '已超期归档'">已超期归档</span>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column min-width="150" align="center" title="超期(天)" field="overdueDay">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span style="color:#5bc0de; font-weight: bold;" v-if="scope.row.status === '暂时未归档'">{{scope.row.overdueDay}}</span>
|
|
|
+ <span style="color:#de6764; font-weight: bold;" v-if="scope.row.status === '超期未归档'">{{scope.row.overdueDay}}</span>
|
|
|
+ <span style="color:#5cb85c; font-weight: bold;" v-if="scope.row.status === '已按时归档'">{{scope.row.overdueDay}}</span>
|
|
|
+ <span style="color:#f0ad4e; font-weight: bold;" v-if="scope.row.status === '已超期归档'">{{scope.row.overdueDay}}</span>
|
|
|
+ </template></vxe-column>
|
|
|
+ <vxe-column min-width="150" align="center" title="罚款金额(元)" field="fineMoney"></vxe-column>
|
|
|
+ <vxe-column min-width="150" align="center" title="签字注师1" field="signatureAnnotatorName1"></vxe-column>
|
|
|
+ <vxe-column min-width="150" align="center" title="签字注师2" field="signatureAnnotatorName2"></vxe-column>
|
|
|
+ <vxe-column min-width="230" align="center" title="案卷号" field="number"></vxe-column>
|
|
|
+ </vxe-table>
|
|
|
+ <vxe-pager
|
|
|
+ background
|
|
|
+ size="small"
|
|
|
+ :current-page="tablePage.currentPage"
|
|
|
+ :page-size="tablePage.pageSize"
|
|
|
+ :total="tablePage.total"
|
|
|
+ :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
|
|
|
+ :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
|
|
|
+ @page-change="currentChangeHandle">
|
|
|
+ </vxe-pager>
|
|
|
+ </div>
|
|
|
+ <ProjectRecordsForm ref="projectRecordsForm"></ProjectRecordsForm>
|
|
|
+ <ProjectReportArchiveForm ref="projectReportArchiveForm"></ProjectReportArchiveForm>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import ProjectReportArchiveDetailService from '@/api/cw/projectRecords/ProjectReportArchiveDetailService'
|
|
|
+ import TaskService from '@/api/flowable/TaskService'
|
|
|
+ import ProcessService from '@/api/flowable/ProcessService'
|
|
|
+ import UserService from '@/api/sys/UserService'
|
|
|
+ import ProjectRecordsForm from '../projectRecords/ProjectRecordsForm'
|
|
|
+ import ProjectReportArchiveForm from './ProjectReportArchiveForm'
|
|
|
+ import SelectUserTree from '@/views/modules/utils/treeUserSelect'
|
|
|
+ import XEUtils from 'xe-utils'
|
|
|
+ export default {
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ searchForm: {
|
|
|
+ name: '',
|
|
|
+ cwProjectRecordsDTO: {
|
|
|
+ id: '',
|
|
|
+ projectName: '',
|
|
|
+ projectMasterId: '',
|
|
|
+ projectMasterName: ''
|
|
|
+ },
|
|
|
+ year: '',
|
|
|
+ number: '',
|
|
|
+ auditDates: [],
|
|
|
+ status: '',
|
|
|
+ reportDates: [],
|
|
|
+ reportNo: '',
|
|
|
+ fileNumber: ''
|
|
|
+ },
|
|
|
+ dataList: [],
|
|
|
+ tablePage: {
|
|
|
+ total: 0,
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ orders: []
|
|
|
+ },
|
|
|
+ tableKey: '',
|
|
|
+ loading: false,
|
|
|
+ processDefinitionAuditId: '',
|
|
|
+ procDefAuditKey: '',
|
|
|
+ isAdmin: false,
|
|
|
+ typeDictList: [
|
|
|
+ {
|
|
|
+ key: '已归档',
|
|
|
+ label: '已归档',
|
|
|
+ childrenList: [
|
|
|
+ {
|
|
|
+ key: '已按时归档',
|
|
|
+ value: '已按时归档',
|
|
|
+ label: '已按时归档'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '已超期归档',
|
|
|
+ value: '已超期归档',
|
|
|
+ label: '已超期归档'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ key: '未归档',
|
|
|
+ label: '未归档',
|
|
|
+ childrenList: [
|
|
|
+ {
|
|
|
+ key: '暂时未归档',
|
|
|
+ value: '暂时未归档',
|
|
|
+ label: '暂时未归档'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: '超期未归档',
|
|
|
+ value: '超期未归档',
|
|
|
+ label: '超期未归档'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ projectReportArchiveDetailService: null,
|
|
|
+ taskService: null,
|
|
|
+ processService: null,
|
|
|
+ userService: null,
|
|
|
+ created () {
|
|
|
+ this.projectReportArchiveDetailService = new ProjectReportArchiveDetailService()
|
|
|
+ this.taskService = new TaskService()
|
|
|
+ this.processService = new ProcessService()
|
|
|
+ this.userService = new UserService()
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ ProjectRecordsForm,
|
|
|
+ ProjectReportArchiveForm,
|
|
|
+ SelectUserTree
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ userName () {
|
|
|
+ return JSON.parse(localStorage.getItem('user')).name
|
|
|
+ },
|
|
|
+ user () {
|
|
|
+ this.createName = JSON.parse(localStorage.getItem('user')).name
|
|
|
+ return JSON.parse(localStorage.getItem('user'))
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ this.refreshList()
|
|
|
+ },
|
|
|
+ activated () {
|
|
|
+ this.refreshList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ formatDate ({ cellValue }) {
|
|
|
+ return XEUtils.toDateString(cellValue, 'yyyy-MM-dd')
|
|
|
+ },
|
|
|
+ // 查看
|
|
|
+ view (id) {
|
|
|
+ this.$refs.projectReportArchiveForm.init('view', id)
|
|
|
+ },
|
|
|
+ viewProject (id) {
|
|
|
+ this.$refs.projectRecordsForm.init('view', id)
|
|
|
+ },
|
|
|
+ // 查询当前用户是否是管理员用户
|
|
|
+ checkIsAdmin () {
|
|
|
+ this.userService.is().then(({data}) => {
|
|
|
+ this.isAdmin = data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 获取数据列表
|
|
|
+ refreshList () {
|
|
|
+ this.loading = true
|
|
|
+ this.projectReportArchiveDetailService.list({
|
|
|
+ 'current': this.tablePage.currentPage,
|
|
|
+ 'size': this.tablePage.pageSize,
|
|
|
+ 'orders': this.tablePage.orders,
|
|
|
+ ...this.searchForm
|
|
|
+ }).then(({data}) => {
|
|
|
+ this.dataList = data.records
|
|
|
+ this.tablePage.total = data.total
|
|
|
+ this.tableKey = Math.random()
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 当前页
|
|
|
+ currentChangeHandle ({ currentPage, pageSize }) {
|
|
|
+ this.tablePage.currentPage = currentPage
|
|
|
+ this.tablePage.pageSize = pageSize
|
|
|
+ this.refreshList()
|
|
|
+ },
|
|
|
+ // 排序
|
|
|
+ sortChangeHandle (column) {
|
|
|
+ this.tablePage.orders = []
|
|
|
+ if (column.order != null) {
|
|
|
+ this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
|
|
|
+ }
|
|
|
+ this.refreshList()
|
|
|
+ },
|
|
|
+ resetSearch () {
|
|
|
+ this.$refs.searchForm.resetFields()
|
|
|
+ this.refreshList()
|
|
|
+ },
|
|
|
+ // 自定义服务端导出
|
|
|
+ exportMethod ({ options }) {
|
|
|
+ // 传给服务端的参数
|
|
|
+ const params = {
|
|
|
+ 'current': this.tablePage.currentPage,
|
|
|
+ 'size': this.tablePage.pageSize,
|
|
|
+ 'orders': this.tablePage.orders,
|
|
|
+ ...this.searchForm,
|
|
|
+ filename: options.filename,
|
|
|
+ sheetName: options.sheetName,
|
|
|
+ isHeader: options.isHeader,
|
|
|
+ original: options.original,
|
|
|
+ mode: options.mode,
|
|
|
+ selectIds: options.mode === 'selected' ? options.data.map(item => item.id) : [],
|
|
|
+ exportFields: options.columns.map(column => column.property)
|
|
|
+ }
|
|
|
+ return this.projectReportArchiveDetailService.exportExcel(params).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadExcel(res.data, options.filename)
|
|
|
+ }).catch(function (err) {
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|