|
@@ -28,6 +28,7 @@
|
|
|
height="calc(100vh - 300px)"
|
|
height="calc(100vh - 300px)"
|
|
|
full-height="calc(100vh - 116px)"
|
|
full-height="calc(100vh - 116px)"
|
|
|
tool-class="ele-toolbar-form"
|
|
tool-class="ele-toolbar-form"
|
|
|
|
|
+ :selection.sync="selection"
|
|
|
cache-key="eomContactPageTable"
|
|
cache-key="eomContactPageTable"
|
|
|
>
|
|
>
|
|
|
<!-- 表头工具栏 -->
|
|
<!-- 表头工具栏 -->
|
|
@@ -41,6 +42,16 @@
|
|
|
>
|
|
>
|
|
|
新建
|
|
新建
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ el-icon-delete
|
|
|
|
|
+ class="ele-btn-icon"
|
|
|
|
|
+ @click="allDelBtn"
|
|
|
|
|
+ :disabled="selection?.length===0"
|
|
|
|
|
+ >
|
|
|
|
|
+ 批量删除
|
|
|
|
|
+ </el-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template v-slot:name="{ row }">
|
|
<template v-slot:name="{ row }">
|
|
@@ -101,7 +112,8 @@
|
|
|
|
|
|
|
|
<AddContactDialog ref="addContactDialogRef" :categoryTreeList="treeList" @done="reload"></AddContactDialog>
|
|
<AddContactDialog ref="addContactDialogRef" :categoryTreeList="treeList" @done="reload"></AddContactDialog>
|
|
|
<ContactDetailDialog ref="contactDetailDialogRef"></ContactDetailDialog>
|
|
<ContactDetailDialog ref="contactDetailDialogRef"></ContactDetailDialog>
|
|
|
-
|
|
|
|
|
|
|
+<!-- 多选删除弹窗 -->
|
|
|
|
|
+ <pop-modal :visible.sync="delVisible" content="是否确定删除?" @done="commitBtn"/>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -109,6 +121,7 @@
|
|
|
import ContactSearch from './components/contactSearch.vue';
|
|
import ContactSearch from './components/contactSearch.vue';
|
|
|
import AddContactDialog from './components/addContactDialog.vue';
|
|
import AddContactDialog from './components/addContactDialog.vue';
|
|
|
import ContactDetailDialog from './components/contactDetailDialog.vue';
|
|
import ContactDetailDialog from './components/contactDetailDialog.vue';
|
|
|
|
|
+import popModal from '@/components/pop-modal';
|
|
|
import AssetTree from '@/components/AssetTree';
|
|
import AssetTree from '@/components/AssetTree';
|
|
|
import {contactDelete, contactPage, contactTypeTree, updateStatus} from '@/api/saleManage/contact';
|
|
import {contactDelete, contactPage, contactTypeTree, updateStatus} from '@/api/saleManage/contact';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
@@ -118,14 +131,23 @@ export default {
|
|
|
components: {
|
|
components: {
|
|
|
AssetTree,
|
|
AssetTree,
|
|
|
ContactSearch,
|
|
ContactSearch,
|
|
|
|
|
+ popModal,
|
|
|
AddContactDialog,
|
|
AddContactDialog,
|
|
|
ContactDetailDialog,
|
|
ContactDetailDialog,
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ selection:[],
|
|
|
|
|
+ delVisible:false,
|
|
|
// 加载状态
|
|
// 加载状态
|
|
|
loading: false,
|
|
loading: false,
|
|
|
columns: [
|
|
columns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ width: 45,
|
|
|
|
|
+ type: 'selection',
|
|
|
|
|
+ columnKey: 'selection',
|
|
|
|
|
+ align: 'center'
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
columnKey: 'index',
|
|
columnKey: 'index',
|
|
|
label: '序号',
|
|
label: '序号',
|
|
@@ -289,6 +311,19 @@ export default {
|
|
|
this.$refs.addContactDialogRef.$refs.form &&
|
|
this.$refs.addContactDialogRef.$refs.form &&
|
|
|
this.$refs.addContactDialogRef.$refs.form.clearValidate();
|
|
this.$refs.addContactDialogRef.$refs.form.clearValidate();
|
|
|
},
|
|
},
|
|
|
|
|
+ //批量删除
|
|
|
|
|
+ allDelBtn(){
|
|
|
|
|
+ if(this.selection.length===0) return
|
|
|
|
|
+ this.delVisible=true
|
|
|
|
|
+ },
|
|
|
|
|
+ commitBtn(){
|
|
|
|
|
+ console.log(this.selection)
|
|
|
|
|
+ const dataId=this.selection.map(v=>v.id)
|
|
|
|
|
+ contactDelete(dataId).then((res) => {
|
|
|
|
|
+ this.$message.success('删除成功!');
|
|
|
|
|
+ this.reload();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
remove(row) {
|
|
remove(row) {
|
|
|
contactDelete([row.id]).then((res) => {
|
|
contactDelete([row.id]).then((res) => {
|
|
|
this.$message.success('删除成功!');
|
|
this.$message.success('删除成功!');
|