From bc2747387df0693aa46a55bb556985aaf881d843 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期三, 24 八月 2022 19:18:32 +0800
Subject: [PATCH] 导入
---
src/views/troubleshooting/index.vue | 90 +++++++++++++++++++++++++++++---------------
1 files changed, 59 insertions(+), 31 deletions(-)
diff --git a/src/views/troubleshooting/index.vue b/src/views/troubleshooting/index.vue
index f018045..e2ca9bc 100644
--- a/src/views/troubleshooting/index.vue
+++ b/src/views/troubleshooting/index.vue
@@ -46,7 +46,7 @@
</el-option>
</el-select>
</el-col>
- <div v-if="upType == 1">
+ <div v-if="upType == 2">
<el-col :span="5" :offset="1">
<el-date-picker type="date" placeholder="选择日期" v-model="upTimeStart" style="width: 100%" value-format="yyyy-MM-dd"></el-date-picker>
</el-col>
@@ -94,7 +94,17 @@
<el-table-column prop="ADDRESS" label="地点" align="center" width="120"></el-table-column>
<el-table-column prop="HOST" label="主持人" align="center" width="120"></el-table-column>
<el-table-column prop="CONFERENCE_PROFESSIONAL" label="会议专业" align="center" width="120"></el-table-column>
- <el-table-column prop="meeting_content" label="会议摘要" align="center"></el-table-column>
+ <el-table-column prop="meeting_content" label="会议摘要" align="center">
+ <template slot-scope="scope">
+ <el-popover trigger="hover" placement="top">
+ <p>{{ scope.row.meeting_content }}</p>
+ <div slot="reference" class="name-wrapper">{{
+ scope.row.meeting_content != null && scope.row.meeting_content.length > 20 ? scope.row.meeting_content.substring(0, 18) + "...." : scope.row.meeting_content
+ }}
+ </div>
+ </el-popover>
+ </template>
+ </el-table-column>
<el-table-column prop="realFileName" label="会议纪要" align="center">
<template slot-scope="scope" >
@@ -182,6 +192,7 @@
<el-upload
class="upload-demo"
ref="upload"
+ action="https://jsonplaceholder.typicode.com/posts/"
:http-request="uploadSectionFile"
:on-preview="handlePreview"
:on-remove="handleRemove"
@@ -210,7 +221,7 @@
</div>
</template>
<script>
-import {getPageList,addOrEdit, del, revoke, put} from "@/api/sgyhpczl/troubleshooting";
+import {getPageList,addOrEdit, del, revoke, upload_do} from "@/api/sgyhpczl/troubleshooting";
import {uploadFile} from "@/api/sgyhpczl/hiddenDangerRectification";
import {deepClone} from '@/utils'
import {downloadFile} from "@/api/sgyhpczl/fileUtils";
@@ -240,7 +251,7 @@
listLoading: false,
// fileList:[{name:'aa.doc',url:'sssss.doc'}],
fileList:[],
- upTypeList:[{label:"按勾选上报",value:0},{label:"按时间上报",value:1}],
+ upTypeList:[{label:"按勾选上报",value:0},{label:"按时间上报",value:2}],
upType:0,
upTimeStart:'',
upTimeEnd:'',
@@ -274,7 +285,7 @@
},
changeUpType(val){
this.upType = val;
- if (val == 1){
+ if (val == 2){
this.offset = 2;
}else {
this.offset = 14;
@@ -310,7 +321,9 @@
},
//重置
reset() {
- this.listQuery.form = {};
+ this.listQuery.form = {
+ CONFERENCE_PROFESSIONAL: '0'
+ };
this.getPageList();
},
handleSizeChange(val) {
@@ -359,7 +372,7 @@
if (data.ok) {
var fileName = data.data.fileName[0];
if (!fileName.endsWith("a62b")) {
- fileName = fileName + param.file.realFileName;
+ fileName = fileName + "a62b";
}
this.fileList.push({name:fileName,url:fileName})
}
@@ -535,41 +548,56 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- // revoke(ids).then(() => {
- // this.getPageList()
- // this.$notify({
- // title: "成功",
- // message: "撤销成功",
- // type: "success",
- // duration: 2000,
- // });
- // });
+ let data = {
+ id:ids
+ }
+ revoke(data).then(() => {
+ this.getPageList()
+ this.$notify({
+ title: "成功",
+ message: "撤销成功",
+ type: "success",
+ duration: 2000,
+ });
+ });
}).catch(error => {
});
},
//上报
putBatch() {
- if (this.selectedList == null || this.selectedList.length == 0) {
- this.$message({type: 'warning', message: '至少选中一条数据', duration: 3000})
- return
+ let data = {}
+ if (this.upType == 0){
+ if (this.selectedList == null || this.selectedList.length == 0) {
+ this.$message({type: 'warning', message: '至少选中一条数据', duration: 3000})
+ return
+ }
+ var ids = this.selectedList.map((obj) => {
+ return obj.id
+ }).join(",")
+ data = {
+ type: this.upType,
+ id: ids,
+ }
+ }else {
+ data = {
+ type: this.upType,
+ time: this.upTimeStart+'至'+this.upTimeEnd,
+ }
}
- var ids = this.selectedList.map((obj) => {
- return obj.id
- }).join(",")
this.$confirm('确认上报吗', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- // put(ids).then(() => {
- // this.getPageList()
- // this.$notify({
- // title: "成功",
- // message: "上报成功",
- // type: "success",
- // duration: 2000,
- // });
- // });
+ upload_do(data).then(() => {
+ this.getPageList()
+ this.$notify({
+ title: "成功",
+ message: "上报成功",
+ type: "success",
+ duration: 2000,
+ });
+ });
}).catch(error => {
});
},
--
Gitblit v1.9.2