项目库新增导出、备忘录新增按钮只有不是游客身份

Lvtianfang
吕天方 1 week ago
parent 9dc6e90092
commit e2c0251d17

@ -1,6 +1,6 @@
{
"name": "ruoyi",
"version": "1.0.202409051514",
"version": "1.0.202409091333",
"description": "金鸡湖现代服务业品牌管理系统",
"author": "若依",
"license": "MIT",

@ -6,7 +6,7 @@
<el-col :span="9">
<div class="project-info-top">
<div class="project-info">备忘录</div>
<el-button type="primary" icon="icon iconfont icon-jc-xinjian" size="mini" @click="newMemo"></el-button>
<el-button type="primary" icon="icon iconfont icon-jc-xinjian" size="mini" @click="newMemo" v-if="!roles.includes('sightseer')"></el-button>
<el-button type="primary" icon="icon iconfont icon-jc-daoru" size="mini" @click="exportMemo" :loading="exportLoading">一键导出</el-button>
</div>
</el-col>

@ -3,7 +3,7 @@
<div class="L-main">
<header id="L-header">
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline" ref="queryFrom">
<el-col :span="22">
<el-col :span="20">
<el-form-item label="年份:">
<el-date-picker
class="ignoreElement"
@ -53,8 +53,12 @@
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
</el-form-item>
</el-col>
<el-col :span="2">
<el-button type="primary" class="import-btn" icon="icon iconfont icon-jc-daoru" size="mini" @click="importBtn" v-if="roles.includes('other-gov')"></el-button>
<el-col :span="4">
<!-- <el-button type="primary" class="import-btn" icon="icon iconfont icon-jc-daoru" size="mini" @click="importBtn" v-if="roles.includes('other-gov')"></el-button> -->
<div class="btnss">
<el-button type="primary" class="import-btn" icon="icon iconfont icon-jc-daoru" size="mini" v-if="roles.includes('other-gov')" @click="importBtn"></el-button>
<el-button type="primary" class="import-btn import-btn-export" size="mini" @click="deriveBtn" :loading="exportLoading">导出</el-button>
</div>
</el-col>
</el-form>
</header>
@ -264,7 +268,7 @@ export default {
projectName:[],
declareUnit:"",
projectYear:"",
status: ''
status: '5'
},
options: [],
optionsTwo: [],
@ -342,6 +346,7 @@ export default {
url: process.env.VUE_APP_BASE_API + "/jjh/jProject/importTemplateProject"
},
tabHeader: undefined,
exportLoading:false,
};
},
mounted() {
@ -387,6 +392,7 @@ export default {
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
this.pagination.status = '5'
this.getList();
},
destroyed() {
@ -541,6 +547,32 @@ export default {
}
});
},
//
deriveBtn(){
this.$confirm("是否确认导出项目库数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.exportLoading = true;
if(this.formInline.projectClassify) {
this.formInline.projectBigType = this.formInline.projectClassify[0]
this.formInline.projectMiddleType = this.formInline.projectClassify[1]
this.formInline.projectSmallType = this.formInline.projectClassify[2]
}
console.log(this.formInline);
this.download(
"/jjh/jProject/exportProject",
{
...this.formInline
},
"项目库数据" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
})
.catch(() => { });
},
/** 下载模板操作 */
importTemplate() {
this.download('/jjh/jProject/updateProjectTemplate', {

@ -6,7 +6,7 @@
<el-col :span="9">
<div class="project-info-top">
<div class="project-info">备忘录</div>
<el-button type="primary" icon="icon iconfont icon-jc-xinjian" size="mini" @click="newMemo"></el-button>
<el-button type="primary" icon="icon iconfont icon-jc-xinjian" size="mini" @click="newMemo" v-if="!roles.includes('sightseer')"></el-button>
<el-button type="primary" icon="icon iconfont icon-jc-daoru" size="mini" @click="exportMemo" :loading="exportLoading">一键导出</el-button>
</div>
</el-col>

Loading…
Cancel
Save