@@ -48,17 +50,20 @@
试验结果
-
+
- 试验结果:{{detailForm.testDate}}
+ 试验结果:
+
+ {{detailForm.originalName}}
- 试验时间:{{detailForm.testDate}}
+ 试验时间:
+ {{detailForm.testDate}}
-
+
- 未试验原因:{{detailForm.meterNum}}
+ 未试验原因:{{detailForm.reasonForNo}}
@@ -155,7 +160,6 @@ export default {
}
},
mounted(){
- console.log('row---------------------',this.rowObj)
this.getDetail()
},
methods:{
@@ -165,6 +169,36 @@ export default {
this.detailForm = res.data.data
})
},
+ downloadA(fileUrl, fileName){
+ const xhr = new XMLHttpRequest();
+ xhr.open('GET', fileUrl, true);
+ xhr.responseType = 'blob';
+
+ xhr.onload = function () {
+ if (xhr.status === 200) {
+ const res = xhr.response;
+ const link = document.createElement('a');
+ link.style.display = 'none';
+ const url = window.URL.createObjectURL(res);
+ link.href = url;
+ link.setAttribute('download', fileName);
+ document.body.appendChild(link);
+ link.click();
+ window.URL.revokeObjectURL(link.href);
+ document.body.removeChild(link);
+ } else {
+ console.error('下载失败:', xhr.status);
+ ElMessage.error('下载失败,请稍后重试');
+ }
+ };
+
+ xhr.onerror = function() {
+ console.error('下载请求出错');
+ ElMessage.error('下载请求出错,请检查网络连接');
+ };
+
+ xhr.send();
+ },
closeDialog(){
this.$emit('closeDialog');
},
diff --git a/src/views/periodicTesting/projectCycle.vue b/src/views/periodicTesting/projectCycle.vue
index 4c4475f..ef7600e 100644
--- a/src/views/periodicTesting/projectCycle.vue
+++ b/src/views/periodicTesting/projectCycle.vue
@@ -215,7 +215,7 @@ export default {
},
{
label: '试验标准',
- prop: 'cycleTestItemStandard',
+ prop: 'cycleTestStandardName',
search: false,
sortable: true,
width: 200,
diff --git a/src/views/periodicTesting/testProject.vue b/src/views/periodicTesting/testProject.vue
index a80ca3c..e767ace 100644
--- a/src/views/periodicTesting/testProject.vue
+++ b/src/views/periodicTesting/testProject.vue
@@ -29,7 +29,8 @@
删除
- {{row.originalName}}
+ {{row.originalName}}
+
@@ -191,6 +192,37 @@ export default {
});
},
+ downloadA(fileUrl, fileName){
+ const xhr = new XMLHttpRequest();
+ xhr.open('GET', fileUrl, true);
+ xhr.responseType = 'blob';
+
+ xhr.onload = function () {
+ if (xhr.status === 200) {
+ const res = xhr.response;
+ const link = document.createElement('a');
+ link.style.display = 'none';
+ const url = window.URL.createObjectURL(res);
+ link.href = url;
+ link.setAttribute('download', fileName);
+ document.body.appendChild(link);
+ link.click();
+ window.URL.revokeObjectURL(link.href);
+ document.body.removeChild(link);
+ } else {
+ console.error('下载失败:', xhr.status);
+ ElMessage.error('下载失败,请稍后重试');
+ }
+ };
+
+ xhr.onerror = function() {
+ console.error('下载请求出错');
+ ElMessage.error('下载请求出错,请检查网络连接');
+ };
+
+ xhr.send();
+ },
+
// 点击上方删除按钮,多条删除
handleDeletes() {
if (this.selectionList.length == 0) {
diff --git a/src/views/periodicTesting/testTask.vue b/src/views/periodicTesting/testTask.vue
index 547dac0..dc1aca4 100644
--- a/src/views/periodicTesting/testTask.vue
+++ b/src/views/periodicTesting/testTask.vue
@@ -22,8 +22,8 @@
批量下发
- 临期
- 超期
+ 临期
+ 超期
详情
@@ -334,7 +334,7 @@ export default {
},
{
label: '试验标准',
- prop: 'cycleTestItemStandard',
+ prop: 'cycleTestStandardName',
type: 'textarea',
search: false,
sortable: true,
@@ -523,7 +523,8 @@ export default {
},
selectionList: [],
dialogType: '',
- issueType:'one'
+ issueType:'one',
+ filterType:''
};
},
computed: {
@@ -609,6 +610,12 @@ export default {
this.issueDialog = true;
}
},
+ // 临期超期筛选数据
+ handleSearch(val){
+ this.page.currentPage = 1
+ this.filterType = val
+ this.onLoad(this.page)
+ },
// 单个下发
issueRow(row) {
this.issueType = 'one'
@@ -633,8 +640,6 @@ export default {
},
writeSubmit() {
this.$refs.writeForm.validate(valid => {
- console.log('valid=============================', valid);
- console.log('fileList=============================', this.fileList);
if (valid) {
let params ={
id:this.writeForm.id,
@@ -643,7 +648,6 @@ export default {
testAttachId:this.writeForm.isDone == 1 ? this.fileList.map(item => item.attachId).join(',') : '',
reasonForNo:this.writeForm.isDone == 2 ? this.writeForm.reasonForNo ? this.writeForm.reasonForNo : '' : ''
}
- console.log('params==============',params)
writeTask(params).then(res =>{
if(res.data.code == 200){
this.$message.success('填报成功')
@@ -657,10 +661,12 @@ export default {
},
searchReset() {
this.query = {};
+ this.filterType = ''
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
+ this.filterType = ''
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
@@ -711,7 +717,7 @@ export default {
onLoad(page, params = {}) {
this.loading = true;
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query),this.filterType).then(res => {
this.data = res.data.data.records;
this.loading = false;