|
@@ -44,6 +44,17 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
|
|
|
+ <el-form-item label="作废归档状态" prop="status">
|
|
|
+ <el-select size="small" v-model="searchForm.applyFileType" placeholder="请选择报告作废归档状态" style="width:100%;"clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in $dictUtils.getDictList('filed_type')"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item>
|
|
|
<el-button type="default" @click="showHide" size="small" :icon="showHideIcon">{{showHideName}}</el-button>
|
|
|
<el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
|
|
@@ -51,14 +62,13 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="bg-white top" style="">
|
|
|
- <vxe-toolbar :refresh="{query: refreshList}" custom>
|
|
|
+ <vxe-toolbar :refresh="{query: refreshList}" export custom>
|
|
|
<!-- <template #buttons>-->
|
|
|
<!-- <el-button v-if="hasPermission('cw_work_client:info:add')" type="primary" size="small" icon="el-icon-plus" @click="start()">新建</el-button>-->
|
|
|
<!-- </template>-->
|
|
|
</vxe-toolbar>
|
|
|
<div style="height: calc(100% - 90px)">
|
|
|
<vxe-table
|
|
|
- :key="tableKey"
|
|
|
border="inner"
|
|
|
auto-resize
|
|
|
resizable
|
|
@@ -69,6 +79,15 @@
|
|
|
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}"
|
|
@@ -84,6 +103,13 @@
|
|
|
</vxe-column>
|
|
|
<vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
|
|
|
<vxe-column min-width="160" align="center" title="项目名称" field="projectName"></vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="报告文号" field="reportNo">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-link type="primary" :underline="false" v-if="hasPermission('cwProjectReport:list')&&commonJS.isNotEmpty(scope.row.reportId)" @click="viewReport(scope.row.reportId)">{{scope.row.reportNo}}</el-link>
|
|
|
+ <el-link type="primary" :underline="false" v-else-if="hasPermission('cwProjectReport:list')&&commonJS.isNotEmpty(scope.row.reportId)" @click="viewReport(scope.row.reportId)">{{scope.row.reportNo}}</el-link>
|
|
|
+ <span v-else>{{scope.row.reportNo}}</span>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
<vxe-column min-width="160" align="center" title="报告所属部门" field="departmentName"></vxe-column>
|
|
|
<vxe-column min-width="160" align="center" title="项目经理1" field="projectMasterName"></vxe-column>
|
|
|
<vxe-column min-width="160" align="center" title="项目经理2" field="projectMaster2Name"></vxe-column>
|
|
@@ -140,7 +166,7 @@
|
|
|
</vxe-pager>
|
|
|
</div>
|
|
|
</div>
|
|
|
-<!-- <ReportManagementForm ref="reportManagementForm"></ReportManagementForm>-->
|
|
|
+ <ReportManagementForm ref="reportManagementForm"></ReportManagementForm>
|
|
|
<ReportCancellApplyForm ref="reportCancellApplyForm"></ReportCancellApplyForm>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -152,7 +178,7 @@
|
|
|
import ReportCancellApplyArchivedService from '@/api/cw/reportCancellApplyArchived/ReportCancellApplyArchivedService'
|
|
|
import TaskService from '@/api/flowable/TaskService'
|
|
|
import ProcessService from '@/api/flowable/ProcessService'
|
|
|
- // import ReportManagementForm from '../reportManagement/ReportManagementForm'
|
|
|
+ import ReportManagementForm from '../reportManagement/ReportManagementForm'
|
|
|
import ReportCancellApplyForm from './ReportCancellApplyArchivedForm'
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
import pick from 'lodash.pick'
|
|
@@ -208,7 +234,7 @@
|
|
|
this.userService = new UserService()
|
|
|
},
|
|
|
components: {
|
|
|
- // ReportManagementForm
|
|
|
+ ReportManagementForm,
|
|
|
ReportCancellApplyForm,
|
|
|
SelectUserTree,
|
|
|
UserSelect
|
|
@@ -258,6 +284,11 @@
|
|
|
// this.$refs.reportManagementForm.init('view', id)
|
|
|
this.$refs.reportCancellApplyForm.init('view', id)
|
|
|
},
|
|
|
+ // 根据报告id查看报告详情
|
|
|
+ viewReport (id) {
|
|
|
+ this.$refs.reportManagementForm.init('view', id)
|
|
|
+ // this.$refs.reportCancellApplyForm.init('view', id)
|
|
|
+ },
|
|
|
// 查询当前用户是否是管理员用户
|
|
|
checkIsAdmin () {
|
|
|
this.userService.is().then(({data}) => {
|
|
@@ -639,6 +670,31 @@
|
|
|
}
|
|
|
}
|
|
|
return false
|
|
|
+ },
|
|
|
+ // 自定义服务端导出
|
|
|
+ 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.reportCancellApplyArchivedService.exportExcel(params).then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadExcel(res.data, options.filename)
|
|
|
+ }).catch(function (err) {
|
|
|
+ if (err.response) {
|
|
|
+ // console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|