Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -170,6 +170,15 @@ export function taskDel (data) {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//模板下载
|
||||
export function downloadStatus(data) {
|
||||
return axios({
|
||||
url: '/api/importWkExcel/exportqbzxdjh',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
// 整改流程 详情查询nonconformity
|
||||
export function getNonconformity (data) {
|
||||
return axios({
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<div class="tableButton">
|
||||
<el-button type="primary" size="small" @click="addQblx('add','企标制修订立项计划')">新增</el-button>
|
||||
<el-button type="plain" size="small" @click="uploadQblx">导入</el-button>
|
||||
<el-button type="success" size="small" @click="qblxTemplate">模板下载</el-button>
|
||||
<el-button type="success" size="small" @click="downloadStatus">模板下载</el-button>
|
||||
<el-button type="danger" size="small" @click="delQblx">批量删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -342,11 +342,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ProcessHeader from '../../components/ProcessHeader'
|
||||
import ProcessFooter from '../../components/ProcessFooter'
|
||||
import ProcessTitle from '../../components/ProcessTitle'
|
||||
import ProcessHeader from "../../components/ProcessHeader";
|
||||
import ProcessFooter from "../../components/ProcessFooter";
|
||||
import ProcessTitle from "../../components/ProcessTitle";
|
||||
import MechanismTree from "@/components/mechanismTree";
|
||||
import {completeTask, saveTaskFirst, taskDel, processBack, queryTaskFirst} from '@/api/process.js'
|
||||
import { queryTaskFirst, saveTaskFirst, taskDel, downloadStatus } from "@/api/process.js";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -790,27 +790,47 @@ export default {
|
||||
|
||||
},
|
||||
|
||||
|
||||
/** 模板下载 */
|
||||
qblxTemplate() {},
|
||||
downloadStatus() {
|
||||
downloadStatus().then(res => {
|
||||
let blob = new Blob([res], { type: 'application/vnd.ms-excel' }); //以xls文件为例
|
||||
//浏览器兼容,Google和火狐支持a标签的download,IE不支持
|
||||
if (window.navigator && window.navigator.msSaveBlob) {
|
||||
//IE浏览器、微软浏览器
|
||||
/* 经过测试,微软浏览器Microsoft Edge下载文件时必须要重命名文件才可以打开,
|
||||
IE可不重命名,以防万一,所以都写上比较好 */
|
||||
window.navigator.msSaveBlob(blob, '立项.xls');
|
||||
} else {
|
||||
//其他浏览器
|
||||
let link = document.createElement('a'); // 创建a标签
|
||||
link.style.display = 'none';
|
||||
let objectUrl = URL.createObjectURL(blob);
|
||||
link.href = objectUrl;
|
||||
link.click();
|
||||
URL.revokeObjectURL(objectUrl);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 保存按钮
|
||||
handleSave() {
|
||||
this.saveLoading = true
|
||||
let _formData = new FormData()
|
||||
_formData.append('id', this.bpnId || '')
|
||||
_formData.append('createUser', this.$store.getters.userInfo.userId)
|
||||
_formData.append('createUserName', this.$store.getters.userInfo.userName)
|
||||
_formData.append('prcType', '26')
|
||||
_formData.append('json', JSON.stringify({
|
||||
this.saveLoading = true;
|
||||
let _formData = new FormData();
|
||||
_formData.append("id", this.bpnId || "");
|
||||
_formData.append("createUser", this.$store.getters.userInfo.userId);
|
||||
_formData.append("createUserName", this.$store.getters.userInfo.userName);
|
||||
_formData.append("prcType", "26");
|
||||
_formData.append("json", JSON.stringify({
|
||||
roleForm: this.roleForm,
|
||||
qblx_pageData: this.qblx_pageData,
|
||||
commentText: this.commentText
|
||||
}))
|
||||
}));
|
||||
saveTaskFirst(_formData).then(res => {
|
||||
this.saveLoading = false
|
||||
this.$message.success('保存成功')
|
||||
this.bpnId = res.result
|
||||
this.saveLoading = false;
|
||||
this.$message.success("保存成功");
|
||||
this.bpnId = res.result;
|
||||
}).catch(e => {
|
||||
this.saveLoading = false
|
||||
this.saveLoading = false;
|
||||
})
|
||||
},
|
||||
listSubmit (item) {
|
||||
|
||||
Reference in New Issue
Block a user