From 7a8c85b405820490b6653be923a4b351f437426e Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 25 二月 2025 16:39:39 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev
---
src/views/business/inspectionTask/components/InspectionWord.vue | 7
src/views/CNAS/resourceDemand/facilitiesEnvironment/index.vue | 6
src/views/business/inspectionReview/index.vue | 8
src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue | 22 --
src/views/business/rawMaterialInspection/index.vue | 11 -
src/views/business/reportPreparation/index.vue | 39 +----
src/api/business/rawMaterialOrder.js | 5
src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue | 7
src/views/business/productOrder/index.vue | 26 +--
src/views/business/materialOrder/index.vue | 12 -
src/api/business/productOrder.js | 3
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue | 156 ++++++++--------------
src/api/business/materialInspection.js | 3
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management-dia.vue | 45 +++---
src/api/cnas/resourceDemand/foreignRegister/foreignRegister.js | 65 +++++++++
15 files changed, 189 insertions(+), 226 deletions(-)
diff --git a/src/api/business/materialInspection.js b/src/api/business/materialInspection.js
index 3f592b1..4104e1c 100644
--- a/src/api/business/materialInspection.js
+++ b/src/api/business/materialInspection.js
@@ -93,6 +93,7 @@
return request({
url: '/rawMaterialOrder/rawAllExport',
method: 'post',
- data: query
+ data: query,
+ responseType: "blob"
})
}
diff --git a/src/api/business/productOrder.js b/src/api/business/productOrder.js
index 8ae703b..00862c6 100644
--- a/src/api/business/productOrder.js
+++ b/src/api/business/productOrder.js
@@ -22,7 +22,8 @@
return request({
url: '/insOrder/rawAllInsOrderExport',
method: 'post',
- data: query
+ data: query,
+ responseType: "blob"
})
}
// 灏嗗緟妫�楠岀殑鐨勬挙閿�杩涜鏇存敼
diff --git a/src/api/business/rawMaterialOrder.js b/src/api/business/rawMaterialOrder.js
index 4b5c746..31f9cb3 100644
--- a/src/api/business/rawMaterialOrder.js
+++ b/src/api/business/rawMaterialOrder.js
@@ -214,12 +214,13 @@
data: query
})
}
-// 鍘熸潗鏂欎笅鍗曞嚭鍘傛挙閿�
+// 鍘熸潗鏂欐姤妫�鍏ㄩ儴瀵煎嚭
export function rawAllExport(query) {
return request({
url: '/rawMaterialOrder/rawAllExport',
method: 'post',
- data: query
+ data: query,
+ responseType: "blob"
})
}
// 鍘熸潗鏂欎笅鍗曞嚭鍘傛挙閿�
diff --git a/src/api/cnas/resourceDemand/foreignRegister/foreignRegister.js b/src/api/cnas/resourceDemand/foreignRegister/foreignRegister.js
new file mode 100644
index 0000000..7811cf5
--- /dev/null
+++ b/src/api/cnas/resourceDemand/foreignRegister/foreignRegister.js
@@ -0,0 +1,65 @@
+import request from '@/utils/request'
+
+// 澶栨潵浜哄憳鍒嗛〉鏌ヨ
+export function pageForeignRegister(query) {
+ return request({
+ url: '/foreignRegister/pageForeignRegister',
+ method: 'get',
+ params: query
+ })
+}
+
+// 澶栨潵浜哄憳鏌ョ湅璇︽儏
+export function getForeignRegisterOne(query) {
+ return request({
+ url: '/foreignRegister/getForeignRegisterOne',
+ method: 'get',
+ params: query
+ })
+}
+
+// 鑾峰彇鐢ㄦ埛鍒楄〃
+export function selectUserCondition(query) {
+ return request({
+ url: "/system/newUser/selectUserCondition",
+ method: "get",
+ params: query,
+ });
+}
+
+// 澶栨潵浜哄憳鏂板
+export function addForeignRegister(query) {
+ return request({
+ url: '/foreignRegister/addForeignRegister',
+ method: 'post',
+ data: query
+ })
+}
+
+// 澶栨潵浜哄憳淇敼
+export function updateForeignRegister(query) {
+ return request({
+ url: '/foreignRegister/updateForeignRegister',
+ method: 'post',
+ data: query
+ })
+}
+
+//澶栨潵浜哄憳鍒犻櫎
+export function delForeignRegister(query) {
+ return request({
+ url: '/foreignRegister/delForeignRegister',
+ method: 'delete',
+ params: query
+ })
+}
+
+// 瀵煎嚭澶栨潵浜哄憳
+export function exportForeignRegister(query) {
+ return request({
+ url: "/foreignRegister/exportForeignRegister",
+ method: "get",
+ responseType: "blob",
+ params: query,
+ });
+}
diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management-dia.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management-dia.vue
index 14d2b3b..ec6912c 100644
--- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management-dia.vue
+++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management-dia.vue
@@ -71,6 +71,13 @@
</template>
<script>
+import {
+ getForeignRegisterOne,
+ selectUserCondition,
+ addForeignRegister,
+ updateForeignRegister
+} from '@/api/cnas/resourceDemand/foreignRegister/foreignRegister'
+
export default {
name: 'Personnel-management-dia',
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -126,10 +133,11 @@
// 鏌ヨ璇︽儏
searchInfo (row) {
this.diaLoading = true
- this.$axios(this.$api.foreignRegister.getForeignRegisterOne + '?registerId=' + row.registerId).then(res => {
+ getForeignRegisterOne({registerId : row.registerId}).then(res =>{
this.diaLoading = false
- if (res.code === 201) return
- this.form = res.data
+ if (res.code === 200){
+ this.form = res.data
+ }
}).catch(err => {
console.log(err)
this.diaLoading = false
@@ -150,31 +158,24 @@
internalImplementDto.approveName = this.personList[index].label
}
if (this.operationType === 'add') {
- this.$axios.post(this.$api.foreignRegister.addForeignRegister, internalImplementDto, {
- headers: {
- "Content-Type": "application/json"
- },
- noQs: true
- }).then(res => {
+ addForeignRegister(internalImplementDto).then(res => {
this.loading = false
- if (res.code === 201) return
- this.$message.success('鎿嶄綔鎴愬姛')
- this.closeThreeWastesDia()
+ if (res.code === 200){
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.closeThreeWastesDia()
+ }
}).catch(err => {
console.log('err---', err);
this.loading = false
})
} else if (this.operationType === 'edit') {
- this.$axios.post(this.$api.foreignRegister.updateForeignRegister, internalImplementDto, {
- headers: {
- "Content-Type": "application/json"
- },
- noQs: true
- }).then(res => {
+ updateForeignRegister(internalImplementDto).then(res => {
this.loading = false
- if (res.code === 201) return
- this.$message.success('鎿嶄綔鎴愬姛')
- this.closeThreeWastesDia()
+ if (res.code === 200){
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.closeThreeWastesDia()
+ }
+
}).catch(err => {
console.log('err---', err);
this.loading = false
@@ -192,7 +193,7 @@
this.$emit('closeThreeWastesDia')
},
getAuthorizedPerson() {
- this.$axios.get(this.$api.user.getUserMenu).then(res => {
+ selectUserCondition().then(res => {
let data = []
res.data.forEach(a => {
data.push({
diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue
index b15fbc2..3c32a22 100644
--- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue
+++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue
@@ -1,52 +1,52 @@
<template>
- <div>
- <div class="search-background">
- <span class="search-group">
- <span style="width: 160px">鏃ユ湡锛�</span>
- <el-date-picker v-model="searchForm.registerDate"
- clearable
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- size="small"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd">
+ <div class="capacity-scope">
+ <div class="search">
+ <div>
+ <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
+ <el-form-item label="鏃ユ湡" prop="registerDate">
+ <el-date-picker v-model="searchForm.registerDate"
+ clearable
+ format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ size="small"
+ style="width: 100%"
+ type="date"
+ value-format="yyyy-MM-dd">
</el-date-picker>
- <el-button size="medium" style="margin-left: 10px" @click="resetSearchForm">閲� 缃�</el-button>
- <el-button size="medium" type="primary" @click="searchList">鏌� 璇�</el-button>
- </span>
- <span class="search-group">
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">鏌� 璇�</el-button>
+ <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">閲� 缃�</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div>
<el-button size="medium" @click="handleDown">瀵� 鍑�</el-button>
<el-button size="medium" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button>
- </span>
+ </div>
</div>
<div class="table">
- <ZTTable
- :column="tableColumn"
- :height="'calc(100vh - 20em)'"
- :table-data="tableData"
- :table-loading="tableLoading"
- style="padding: 0 10px;margin-bottom: 16px">
- </ZTTable>
- <el-pagination :current-page="1" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]"
- :total="total" layout="->,total, sizes, prev, pager, next, jumper"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange">
- </el-pagination>
+ <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination"
+ :page="page" :tableLoading="tableLoading"></lims-table>
</div>
<personnel-management-dia v-if="threeWastesDia" ref="threeWastesDia" @closeThreeWastesDia="closeThreeWastesDia"></personnel-management-dia>
</div>
</template>
<script>
-// import ZTTable from '../../caorui/ZTTable/index.vue';
-// import PersonnelManagementDia from './Personnel-management-dia.vue';
import PersonnelManagementDia from '../component/Personnel-management-dia.vue';
+import limsTable from '@/components/Table/lims-table.vue'
+
+import {
+ pageForeignRegister,
+ delForeignRegister,
+ exportForeignRegister
+} from '@/api/cnas/resourceDemand/foreignRegister/foreignRegister'
export default {
name: 'Personnel-management',
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
- components: { PersonnelManagementDia},
+ components: { limsTable, PersonnelManagementDia},
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -121,8 +121,9 @@
tableData: [],
tableLoading: false,
page: {
- size: 20,
- current: 1,
+ total: 0,
+ size: 10,
+ current: 1
},
total: 0,
threeWastesDia: false
@@ -135,19 +136,17 @@
methods: {
// 鏌ヨ鍒楄〃
searchList () {
- const entity = this.searchForm
- const page = this.page
this.tableLoading = true
- this.$axios.post(this.$api.foreignRegister.pageForeignRegister, {entity, page}, {
- headers: {
- "Content-Type": "application/json"
- },
- noQs: true
+ pageForeignRegister({
+ ...this.page,
+ ...this.searchForm
}).then(res => {
this.tableLoading = false
- if (res.code === 201) return
- this.tableData = res.data.records
- this.total = res.data.total
+ if (res.code === 200){
+ this.tableData = res.data.records
+ this.page.total = res.data.total
+ }
+
}).catch(err => {
console.log('err---', err);
this.tableLoading = false
@@ -161,11 +160,12 @@
type: 'warning'
}).then(() => {
this.tableLoading = true
- this.$axios.get(this.$api.foreignRegister.delForeignRegister + '?registerId=' + row.registerId).then(res => {
+ delForeignRegister({registerId:row.registerId}).then(res =>{
this.tableLoading = false
- if (res.code === 201) return
- this.$message.success('鍒犻櫎鎴愬姛')
- this.searchList()
+ if (res.code === 200){
+ this.$message.success('鍒犻櫎鎴愬姛')
+ this.searchList()
+ }
}).catch(err => {
this.tableLoading = false
console.log('err---', err);
@@ -185,42 +185,11 @@
})
},
// 瀵煎嚭
- handleDown (row) {
- const entity = this.searchForm
- this.$axios.post(this.$api.foreignRegister.exportForeignRegister,{entity},{
- responseType: "blob",
- headers: {
- "Content-Type": "application/json"
- },
- noQs: true}).then(res => {
- this.outLoading = false
+ handleDown () {
+ exportForeignRegister(this.searchForm).then(res => {
const blob = new Blob([res],{ type: 'application/msword' });
- //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆
- let reader = new FileReader();
- reader.readAsText(blob, 'utf-8');
- reader.onload = () => {
- try {
- let result = JSON.parse(reader.result);
- if (result.message) {
- this.$message.error(result.message);
- } else {
- const url = URL.createObjectURL(blob);
- const link = document.createElement('a');
- link.href = url;
- link.download = '澶栨潵浜哄憳鐧昏' + '.docx';
- link.click();
- this.$message.success('瀵煎嚭鎴愬姛')
- }
- } catch (err) {
- console.log(err);
- const url = URL.createObjectURL(blob);
- const link = document.createElement('a');
- link.href = url;
- link.download = '澶栨潵浜哄憳鐧昏' + '.docx';
- link.click();
- this.$message.success('瀵煎嚭鎴愬姛')
- }
- }
+ this.$download.saveAs(blob, '澶栨潵浜哄憳鐧昏.docx')
+ this.$message.success('瀵煎嚭鎴愬姛')
})
},
closeThreeWastesDia () {
@@ -232,13 +201,9 @@
this.searchForm.registerDate = '';
this.searchList()
},
- // 鍒嗛〉
- handleSizeChange(val) {
- this.page.size = val;
- this.searchList();
- },
- handleCurrentChange(val) {
- this.page.current = val;
+ // 鍒嗛〉鍒囨崲
+ pagination(page) {
+ this.page.size = page.limit
this.searchList();
},
}
@@ -246,16 +211,9 @@
</script>
<style scoped>
-.search-background {
- width: 100%;
- height: 60px;
- line-height: 60px;
+.search {
+ height: 46px;
display: flex;
justify-content: space-between;
-}
-.search-group {
- display: flex;
- align-items: center;
- margin: 0 20px;
}
</style>
diff --git a/src/views/CNAS/resourceDemand/facilitiesEnvironment/index.vue b/src/views/CNAS/resourceDemand/facilitiesEnvironment/index.vue
index 9705d3d..3c6f34b 100644
--- a/src/views/CNAS/resourceDemand/facilitiesEnvironment/index.vue
+++ b/src/views/CNAS/resourceDemand/facilitiesEnvironment/index.vue
@@ -18,15 +18,15 @@
<script>
import FacilitiesEnvironmentalConditions from "../facilitiesEnvironment/component/facilities-environmental-conditions.vue";
// // 澶栨潵浜哄憳绠$悊
- import ExternalPersonnelManagement from "../facilitiesEnvironment/component/Personnel-management.vue";
+// import ExternalPersonnelManagement from "../facilitiesEnvironment/component/Personnel-management.vue";
import A6ThreeWastesTreatment from '../facilitiesEnvironment/component/three-wastes-treatment.vue';
-// import PersonnelManagement from '../do/a6-facilities-environment/Personnel-management.vue';
+ import PersonnelManagement from '../facilitiesEnvironment/component/Personnel-management.vue';
export default {
components: {
// PersonnelManagement,
A6ThreeWastesTreatment,
- ExternalPersonnelManagement,
+ PersonnelManagement,
FacilitiesEnvironmentalConditions
},
data() {
diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue
index 7586d81..8c19573 100644
--- a/src/views/business/inspectionReview/index.vue
+++ b/src/views/business/inspectionReview/index.vue
@@ -362,12 +362,8 @@
},
// 涓嬭浇鎶ュ憡
download(row) {
- let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS
- const link = document.createElement('a');
- link.href = this.javaApi + url;
- link.target = '_blank';
- document.body.appendChild(link);
- link.click();
+ let url = this.javaApi+'/word/' + (row.urlS===null||row.urlS==='')?row.url:row.urlS
+ this.$download.saveAs(url, row.fileName);
},
// 杩樺師鎿嶄綔
handleRestore(row) {
diff --git a/src/views/business/inspectionTask/components/InspectionWord.vue b/src/views/business/inspectionTask/components/InspectionWord.vue
index 4b88e82..862f456 100644
--- a/src/views/business/inspectionTask/components/InspectionWord.vue
+++ b/src/views/business/inspectionTask/components/InspectionWord.vue
@@ -2039,13 +2039,10 @@
let url = '';
if(res.data.type==1){
url = this.javaApi+'/img/'+res.data.fileUrl
- file.downloadIamge(url,row.fileName)
+ this.$download.saveAs(url, row.fileName);
}else{
url = this.javaApi+'/word/'+res.data.fileUrl
- const link = document.createElement('a');
- link.href = url;
- link.download = row.fileName;
- link.click();
+ this.$download.saveAs(url, row.fileName);
}
}
}).catch(error => {
diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue
index 4a20344..c8e8854 100644
--- a/src/views/business/materialOrder/index.vue
+++ b/src/views/business/materialOrder/index.vue
@@ -1073,17 +1073,11 @@
let entity = this.tabIndex === 3 ? { ...this.entity, isInspect: 2 } : { ...this.entity, state: 2, orderState: 4, }
delete entity.orderBy
this.outLoading = true
- rawAllExport({
- entity: entity
- }, { responseType: "blob" }).then(res => {
+ rawAllExport({entity: entity}).then(res => {
this.outLoading = false
this.$message.success('瀵煎嚭鎴愬姛')
- const blob = new Blob([res], { type: 'application/octet-stream' });
- const url = URL.createObjectURL(blob);
- const link = document.createElement('a');
- link.href = url;
- link.download = '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx';
- link.click();
+ let url = this.javaApi + '/word/' + res.data
+ this.$download.saveAs(url, '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx');
})
},
// 鎻愪氦淇敼濮旀墭缂栧彿淇℃伅
diff --git a/src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue b/src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue
index 6ff5627..1f2faab 100644
--- a/src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue
+++ b/src/views/business/materialOrderComponents/materialOrder/downFileDialog.vue
@@ -46,27 +46,13 @@
methods: {
// 杩涘巶妫�楠屾姤鍛婁笅杞�
downLoad0 () {
- let url = this.downLoadInfo.enterUrlS ? this.downLoadInfo.enterUrlS : this.downLoadInfo.enterUrl
- if(url){
- url = url.split('.')[0]+'.pdf'
- const link = document.createElement('a');
- link.href = this.javaApi + url;
- link.target = '_blank';
- document.body.appendChild(link);
- link.click();
- }
+ let url = this.javaApi+'/word/' + this.downLoadInfo.enterUrlS ? this.downLoadInfo.enterUrlS : this.downLoadInfo.enterUrl
+ this.$download.saveAs(url, this.downLoadInfo.fileName);
},
// 瀛e害妫�楠屾姤鍛婁笅杞�
downLoad1 () {
- let url = this.downLoadInfo.quarterUrlS ? this.downLoadInfo.quarterUrlS : this.downLoadInfo.quarterUrl
- if(url){
- url = url.split('.')[0]+'.pdf'
- const link = document.createElement('a');
- link.href = this.javaApi + url;
- link.target = '_blank';
- document.body.appendChild(link);
- link.click();
- }
+ let url = this.javaApi+'/word/' + this.downLoadInfo.quarterUrlS ? this.downLoadInfo.quarterUrlS : this.downLoadInfo.quarterUrl
+ this.$download.saveAs(url, this.downLoadInfo.fileName);
}
},
}
diff --git a/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue b/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
index db188d7..8dc8ee0 100644
--- a/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
+++ b/src/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue
@@ -158,13 +158,10 @@
let url = '';
if (res.data.type == 1) {
url = this.javaApi + '/img/' + res.data.fileUrl
- file.downloadIamge(url, row.fileName)
+ this.$download.saveAs(url, row.fileName);
} else {
url = this.javaApi + '/word/' + res.data.fileUrl
- const link = document.createElement('a');
- link.href = url;
- link.download = row.fileName;
- link.click();
+ this.$download.saveAs(url, row.fileName);
}
}
}).catch(error => {
diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index 757f49d..135973f 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -865,14 +865,10 @@
},
// 瀵煎嚭璁板綍
downLoad () {
- rawAllInsOrderExport({...this.entity, responseType: "blob"}).then(res => {
+ rawAllInsOrderExport({...this.entity}).then(res => {
this.$message.success('瀵煎嚭鎴愬姛')
- const blob = new Blob([res],{ type: 'application/octet-stream' });
- const url = URL.createObjectURL(blob);
- const link = document.createElement('a');
- link.href = url;
- link.download = '濮旀墭妫�娴嬩俊鎭鍑�' + '.xlsx';
- link.click();
+ let url = this.javaApi + '/word/' + res.data
+ this.$download.saveAs(url, '濮旀墭妫�娴嬩俊鎭鍑�.xlsx');
}).catch(err => {
console.log('err---', err);
})
@@ -984,13 +980,10 @@
let url = '';
if(res.data.type==1){
url = this.javaApi+'/img/'+res.data.fileUrl
- file.downloadIamge(url,row.fileName)
+ this.$download.saveAs(url, row.fileName);
}else{
url = this.javaApi+'/word/'+res.data.fileUrl
- const link = document.createElement('a');
- link.href = url;
- link.download = row.fileName;
- link.click();
+ this.$download.saveAs(url, row.fileName);
}
}
}).catch(error => {
@@ -999,14 +992,9 @@
},
// 涓嬭浇鎶ュ憡
download(row) {
- let url = row.urlS?row.urlS:row.url;
+ let url = this.javaApi+'/word/' + row.urlS?row.urlS:row.url;
if(url){
- url = url.split('.')[0]+'.pdf'
- const link = document.createElement('a');
- link.href = this.javaApi + url;
- link.target = '_blank';
- document.body.appendChild(link);
- link.click();
+ this.$download.saveAs(url, this.downLoadInfo.fileName);
}
},
// 鎾ら攢
diff --git a/src/views/business/rawMaterialInspection/index.vue b/src/views/business/rawMaterialInspection/index.vue
index 2ea2eb7..a993bac 100644
--- a/src/views/business/rawMaterialInspection/index.vue
+++ b/src/views/business/rawMaterialInspection/index.vue
@@ -795,16 +795,11 @@
this.outLoading = true
rawAllExport({
entity:entity
- },{
- responseType: "blob"}).then(res => {
+ }).then(res => {
this.outLoading = false
this.$message.success('瀵煎嚭鎴愬姛')
- const blob = new Blob([res],{ type: 'application/octet-stream' });
- const url = URL.createObjectURL(blob);
- const link = document.createElement('a');
- link.href = url;
- link.download = '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx';
- link.click();
+ let url = this.javaApi + '/word/' + res.data
+ this.$download.saveAs(url, "鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx");
})
},
clear() {
diff --git a/src/views/business/reportPreparation/index.vue b/src/views/business/reportPreparation/index.vue
index 60a78b9..640fd87 100644
--- a/src/views/business/reportPreparation/index.vue
+++ b/src/views/business/reportPreparation/index.vue
@@ -43,13 +43,13 @@
:on-success="handleSuccessUp1"
:show-file-list="false"
accept='.doc,.docx'>
- <el-button size="small" type="text" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName">涓婁紶</el-button>
+ <el-button size="small" type="text" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName">涓婁紶</el-button>
</el-upload>
- <el-button type="text" size="small" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName" @click="handleRestore(scope.row)">杩樺師</el-button>
- <el-button type="text" size="small" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName" @click="sendBackTask(scope.row)">閫�鍥炰换鍔�</el-button>
- <el-button type="text" size="small" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName" @click="handle(scope.row)">鎻愪氦</el-button>
- <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 ||scope.row.isExamine == 1 || userName !== scope.row.examineUser" @click="handleIssued(scope.row)">瀹℃牳</el-button>
- <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 || scope.row.isExamine == 0 || scope.row.isExamine == null || scope.row.isRatify == 1 || userName !== scope.row.ratifyUser" @click="handleApprove(scope.row)">鎵瑰噯</el-button>
+ <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" @click="handleRestore(scope.row)">杩樺師</el-button>
+ <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" @click="sendBackTask(scope.row)">閫�鍥炰换鍔�</el-button>
+ <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" @click="handle(scope.row)">鎻愪氦</el-button>
+ <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 ||scope.row.isExamine == 1 || nickName !== scope.row.examineUser" @click="handleIssued(scope.row)">瀹℃牳</el-button>
+ <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 || scope.row.isExamine == 0 || scope.row.isExamine == null || scope.row.isRatify == 1 || nickName !== scope.row.ratifyUser" @click="handleApprove(scope.row)">鎵瑰噯</el-button>
<el-popover placement="bottom" trigger="hover" style="margin-left: 6px">
<template #reference>
<el-button link type="text" size="small">鏇村</el-button>
@@ -555,13 +555,10 @@
let url = '';
if(res.data.type==1){
url = this.javaApi+'/img/'+res.data.fileUrl
- file.downloadIamge(url,row.fileName)
+ this.$download.saveAs(url, row.fileName);
}else{
url = this.javaApi+'/word/'+res.data.fileUrl
- const link = document.createElement('a');
- link.href = url;
- link.download = row.fileName;
- link.click();
+ this.$download.saveAs(url, row.fileName);
}
}
}).catch(error => {
@@ -603,17 +600,7 @@
downAll({ids: str}).then(res => {
this.outLoading = false
this.$message.success('瀵煎嚭鎴愬姛')
- // const blob = new Blob([res],{ type: 'application/octet-stream' });
- // const url = URL.createObjectURL(blob);
- // const link = document.createElement('a');
- // link.href = url;
- // link.download = '鎶ュ憡.zip';
- // link.click();
- const link = document.createElement('a');
- link.href = this.javaApi + res.message;
- link.target = '_blank';
- document.body.appendChild(link);
- link.click();
+ this.$download.saveAs(this.javaApi + res.message, row.fileName);
})
},
beforeUpload(file){
@@ -709,12 +696,8 @@
}
},
download(row) {
- let url = row.urlS ? row.urlS : row.url;
- const link = document.createElement('a');
- link.href = this.javaApi + url;
- link.target = '_blank';
- document.body.appendChild(link);
- link.click();
+ let url = this.javaApi+'/word/' + row.urlS ? row.urlS : row.url;
+ this.$download.saveAs(url, row.fileName);
},
// 杩樺師鎿嶄綔
handleRestore(row) {
--
Gitblit v1.9.3