标准/译文获取申请 导出

This commit is contained in:
baoyu
2024-03-28 17:34:38 +08:00
parent e8e5bbb1eb
commit 0be61e3b97
2 changed files with 36 additions and 9 deletions
@@ -31,7 +31,8 @@ export default {
this.exportModelFlag = false this.exportModelFlag = false
}, },
submit () { submit () {
this.$emit('exportName', this.exportName) this.$emit('exportData', this.exportName)
this.exportModelFlag = false
} }
} }
} }
@@ -20,7 +20,20 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="el-form-item search-item" label="申请单位"> <el-form-item class="el-form-item search-item" label="申请单位">
<el-select v-model="StandardApplyForEOPage.applyForUnitIds" clearable placeholder="请选择申请单位" /> <el-select
v-model="StandardApplyForEOPage.applyForUnitIds"
:placeholder="'请选择申请单位'"
clearable
>
<el-option
v-for="opt in applicantUnitList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
>
{{ opt.label }}
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item class="el-form-item search-item" label="申请人"> <el-form-item class="el-form-item search-item" label="申请人">
<el-select v-model="StandardApplyForEOPage.applyForUserIds" clearable placeholder="请选择申请人" /> <el-select v-model="StandardApplyForEOPage.applyForUserIds" clearable placeholder="请选择申请人" />
@@ -118,7 +131,7 @@
prop="standNum" prop="standNum"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.standLb }}{{ scope.row.standName }}{{ scope.row.standYear}} {{ scope.row.standLb }}{{ scope.row.standName }}{{ scope.row.standYear }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -165,6 +178,8 @@
<div class="table-operate-btn" @click="toView(scope.row)">查看</div> <div class="table-operate-btn" @click="toView(scope.row)">查看</div>
<div v-show="scope.row.status==='pendingApproval'" class="table-operate-btn" @click="batchPass([scope.row.id])">通过</div> <div v-show="scope.row.status==='pendingApproval'" class="table-operate-btn" @click="batchPass([scope.row.id])">通过</div>
<div v-show="scope.row.status==='pendingApproval'" class="table-operate-btn" @click="batchOverrule([scope.row.id])">驳回</div> <div v-show="scope.row.status==='pendingApproval'" class="table-operate-btn" @click="batchOverrule([scope.row.id])">驳回</div>
<div v-show="scope.row.status==='pendingApproval'" class="table-operate-btn" @click="batchOverrule([scope.row.id])">编辑</div>
<div v-show="scope.row.status==='pendingApproval'" class="table-operate-btn" @click="batchOverrule([scope.row.id])">重新提交</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -178,7 +193,7 @@
</div> </div>
<standardsAndTranslationModal ref="standardsAndTranslationModalRef" @updateIndexList="getList" /> <standardsAndTranslationModal ref="standardsAndTranslationModalRef" @updateIndexList="getList" />
<detailModal ref="detailModalRef" /> <detailModal ref="detailModalRef" />
<exportDialog ref="exportDialogRef" /> <exportDialog ref="exportDialogRef" @exportData="exportData" />
</div> </div>
</template> </template>
@@ -206,9 +221,11 @@ export default {
selectedList: [], selectedList: [],
url: { url: {
getList: '/lawss/standardApplyFor/queryByPage', getList: '/lawss/standardApplyFor/queryByPage',
updateState: '/lawss/standardApplyFor/batchUpdateStatus' updateState: '/lawss/standardApplyFor/batchUpdateStatus',
exportData: '/lawss/standardApplyFor/exportStandardApplyForEOExcel'
}, },
typeList: [], typeList: [],
applicantUnitList: [],
statusList: [ statusList: [
{ {
label: '通过', label: '通过',
@@ -243,6 +260,7 @@ export default {
_this: this _this: this
}, res => { }, res => {
this.typeList = res.data.BZJYWTYPE // 标准类别 this.typeList = res.data.BZJYWTYPE // 标准类别
this.applicantUnitList = res.data.QCDW// 申请单位
}, e => { }, e => {
}) })
}, },
@@ -276,8 +294,6 @@ export default {
this.tableLoading = false this.tableLoading = false
}) })
}, },
// 需要调整
batchPass (id) { batchPass (id) {
if (id.length === 0) { if (id.length === 0) {
this.$message({ this.$message({
@@ -338,9 +354,19 @@ export default {
this.$refs.selections.clearSelection() this.$refs.selections.clearSelection()
}) })
}, },
exportData (name) {
exportName (name) { let params = {
...this.StandardApplyForEOPage,
exportFileName: name,
ids: this.selectedList.length > 0 ? this.selectedList.join(',') : ''
}
let url = '/api/lawss/standardApplyFor/exportStandardApplyForEOExcel?'
for (let key in params) {
url += `${key}=${params[key]}&`
}
window.open(url.slice(0, -1))
}, },
exportList () { exportList () {
this.$refs.exportDialogRef.openModel() this.$refs.exportDialogRef.openModel()
}, },