编辑端添加引用批量删除
This commit is contained in:
@@ -98,8 +98,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="refenceCentent mt20">
|
<div class="refenceCentent mt20">
|
||||||
<el-table :data="tableData" ref="multipleTable"
|
<el-table :data="tableData" ref="multipleTable" @selection-change="RefenceSelectionChange"
|
||||||
empty-text="New messages (0)" :show-header="false" :stripe="false" :highlight-current-row="false">
|
empty-text="New messages (0)" :show-header="false" :stripe="false" :highlight-current-row="false">
|
||||||
|
<el-table-column type="selection" width="55"></el-table-column>
|
||||||
<el-table-column type="index" label="No." width="55" align="center"></el-table-column>
|
<el-table-column type="index" label="No." width="55" align="center"></el-table-column>
|
||||||
<el-table-column label="state" width="55" align="center">
|
<el-table-column label="state" width="55" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|||||||
@@ -959,5 +959,5 @@ import VueUeditorWrap from 'vue-ueditor-wrap'; // ES6 Module
|
|||||||
}
|
}
|
||||||
.istitle{margin: 20px 0;}
|
.istitle{margin: 20px 0;}
|
||||||
.Ptitle{background: rgb(23, 138, 184); padding: 4px; margin: 15px 0;}
|
.Ptitle{background: rgb(23, 138, 184); padding: 4px; margin: 15px 0;}
|
||||||
.Ptitle p{margin-bottom: 0 !important; font-weight: bold; color: #fff !important;}
|
.Ptitle p{margin-bottom: 0 !important; font-weight: bold; color: #fff !important; font-style: italic;}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -66,8 +66,15 @@
|
|||||||
<br clear="both">
|
<br clear="both">
|
||||||
</div>
|
</div>
|
||||||
<!-- 新的 -->
|
<!-- 新的 -->
|
||||||
<el-table v-if="showB_step ==2" :data="chanFerForm" ref="multipleTable"
|
<div v-if="showB_step ==2" >
|
||||||
empty-text="New messages (0)" :show-header="false" :stripe="false" :highlight-current-row="false" >
|
<div class="topBtnBox btns" v-if="chanFerForm.length > 0">
|
||||||
|
<el-button type="primary" plain @click="selectAllRef">Select all</el-button>
|
||||||
|
<el-button type="success" plain @click="toggleSelection">Select none</el-button>
|
||||||
|
<el-button type="danger" plain @click="deleteSomeRefs" :disabled="multipleSelection.length > 0 ? false : true">Delete</el-button>
|
||||||
|
</div>
|
||||||
|
<el-table :data="chanFerForm" class="refTable" ref="multipleTable" @selection-change="RefenceSelectionChange"
|
||||||
|
empty-text="New messages (0)" :show-header="false" :stripe="false" :highlight-current-row="false" align="center">
|
||||||
|
<el-table-column type="selection" width="55"></el-table-column>
|
||||||
<el-table-column type="index" label="No." width="55" align="center">
|
<el-table-column type="index" label="No." width="55" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<i v-if="scope.row.is_change == 1" class="itemChanged"></i>
|
<i v-if="scope.row.is_change == 1" class="itemChanged"></i>
|
||||||
@@ -84,7 +91,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="Title" align="left">
|
<el-table-column label="Title" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- journal 形式 -->
|
<!-- journal 形式 -->
|
||||||
<div style="text-align: left;" v-if="scope.row.refer_type == 'journal'">
|
<div style="text-align: left;" v-if="scope.row.refer_type == 'journal'">
|
||||||
@@ -114,6 +121,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div class="bottomBtnBox btns" v-if="chanFerForm.length > 0">
|
||||||
|
<el-button type="primary" plain @click="selectAllRef">Select all</el-button>
|
||||||
|
<el-button type="success" plain @click="toggleSelection">Select none</el-button>
|
||||||
|
<el-button type="danger" plain @click="deleteSomeRefs" :disabled="multipleSelection.length > 0 ? false : true">Delete</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
</div>
|
</div>
|
||||||
<br clear="both">
|
<br clear="both">
|
||||||
@@ -227,7 +240,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 复制word添加引用 -->
|
<!-- 复制word添加引用 -->
|
||||||
<el-dialog title= "Add References'" :visible.sync="showEditor" width="800px" z-index="1000" @close="showEditor= false">
|
<el-dialog title= "Add References'" :visible.sync="showEditor" width="800px" class="wordDia" z-index="1000" @close="showEditor= false">
|
||||||
<div>
|
<div>
|
||||||
<div class="logtips">
|
<div class="logtips">
|
||||||
<p >Paste the contents of the wold file here, delete the carriage return at the end and click "Submit".</p>
|
<p >Paste the contents of the wold file here, delete the carriage return at the end and click "Submit".</p>
|
||||||
@@ -324,7 +337,8 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
addLoading:false,
|
addLoading:false,
|
||||||
editboxVisible:false,
|
editboxVisible:false,
|
||||||
|
multipleSelection:[] // 多选
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -414,6 +428,56 @@ export default {
|
|||||||
this.showB_step = e
|
this.showB_step = e
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
RefenceSelectionChange(val){
|
||||||
|
// console.log(val,666666)
|
||||||
|
this.multipleSelection = val
|
||||||
|
// console.log(this.multipleSelection,'this.multipleSelection')
|
||||||
|
},
|
||||||
|
// 取消选择
|
||||||
|
toggleSelection(){
|
||||||
|
this.multipleSelection = []
|
||||||
|
this.$refs.multipleTable.clearSelection();
|
||||||
|
},
|
||||||
|
// 选中所有
|
||||||
|
selectAllRef(){
|
||||||
|
this.$refs.multipleTable.toggleAllSelection()
|
||||||
|
},
|
||||||
|
// 删除部分引用
|
||||||
|
deleteSomeRefs(){
|
||||||
|
var ids = []
|
||||||
|
ids = this.multipleSelection.map(item=>{
|
||||||
|
return item.p_refer_id
|
||||||
|
})
|
||||||
|
this.$confirm('Are you sure you want to remove the selected references?', 'Tips', {
|
||||||
|
confirmButtonText: 'Sure',
|
||||||
|
cancelButtonText: 'Cancel',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: 'please wait',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
});
|
||||||
|
this.$api
|
||||||
|
.post('api/Preaccept/delRefers', {
|
||||||
|
'ids': ids
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
loading.close();
|
||||||
|
if (res.code == 0) {
|
||||||
|
console.log(res)
|
||||||
|
this.changeRefer()
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
loading.close();
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
// 清空引用数据
|
// 清空引用数据
|
||||||
clearRefences(){
|
clearRefences(){
|
||||||
@@ -920,6 +984,7 @@ export default {
|
|||||||
/* 编辑器高度 */
|
/* 编辑器高度 */
|
||||||
/* /deep/ #edui1_iframeholder{ height: 260px;} */
|
/* /deep/ #edui1_iframeholder{ height: 260px;} */
|
||||||
|
|
||||||
|
.wordDia{max-height: 800px; overflow-y:scroll ;}
|
||||||
.logtips{margin-bottom: 15px; color: #666;}
|
.logtips{margin-bottom: 15px; color: #666;}
|
||||||
/* .itemIndex{position: relative;} */
|
/* .itemIndex{position: relative;} */
|
||||||
.itemChanged{position: absolute; display: inline-block; background: #006699; color: #fff; padding: 7px; border-radius: 0 0 7px 7px; left: 0; top: 0;}
|
.itemChanged{position: absolute; display: inline-block; background: #006699; color: #fff; padding: 7px; border-radius: 0 0 7px 7px; left: 0; top: 0;}
|
||||||
@@ -1505,4 +1570,7 @@ export default {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
.refTable th{background: red !important; color: #666;}
|
||||||
|
.topBtnBox.btns{margin-bottom: 20px;}
|
||||||
|
.bottomBtnBox.btns{margin-top: 20px;}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user