yuansh 2 yıl önce
ebeveyn
işleme
d0a597f432
1 değiştirilmiş dosya ile 48 ekleme ve 30 silme
  1. 48 30
      src/views/system/modules/AddressListRight.vue

+ 48 - 30
src/views/system/modules/AddressListRight.vue

@@ -35,7 +35,7 @@
       ref="table"
       size="middle"
       bordered
-      rowKey="userId"
+      rowKey="id"
       :pagination="ipagination"
       :columns="columns"
       :dataSource="dataSource"
@@ -48,7 +48,7 @@
 </template>
 
 <script>
-  import { getAction } from '@/api/manage'
+  import { getAction,deleteAction } from '@/api/manage'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 
   export default {
@@ -62,31 +62,31 @@
         cardLoading: true,
         positionInfo: {},
         columns: [
-          {
-            title: '#',
-            key: 'rowIndex',
-            dataIndex: '',
-            width: 60,
-            align: 'center',
-            customRender: (t, r, i) => parseInt(i) + 1
-          },
+          // {
+          //   title: '#',
+          //   key: 'rowIndex',
+          //   dataIndex: '',
+          //   width: 60,
+          //   align: 'center',
+          //   customRender: (t, r, i) => parseInt(i) + 1
+          // },
           {
             title: '姓名',
-            width: '10%',
+            width: '7%',
             align: 'center',
             dataIndex: 'realname'
           },
           {
             title: '工号',
-            width: '15%',
+            width: '7%',
             align: 'center',
             dataIndex: 'workNo'
           },
           {
             title: '部门',
-            width: '10%',
+            width: '15%',
             align: 'center',
-            dataIndex: 'departName'
+            dataIndex: 'departIds'
           },
           {
             title: '职务',
@@ -99,41 +99,35 @@
             title: '手机',
             width: '10%',
             align: 'center',
-            dataIndex: 'telephone'
+            dataIndex: 'phone'
           },
           {
             title: '虚拟网号',
-            width: '15%',
+            width: '10%',
             align: 'center',
-            dataIndex: 'virtualNetworkNumber'
+            dataIndex: 'nVirtualNo'
           },
           {
             title: '公司电话',
             width: '10%',
             align: 'center',
-            dataIndex: 'companyOfficeNumber'
+            dataIndex: 'nCompanyPhone'
           },
           {
             title: '公司内线',
-            width: '15%',
+            width: '10%',
             align: 'center',
-            dataIndex: 'companyInsider'
+            dataIndex: 'nCompanyLine'
           },
           {
             title: '家电',
-            width: '15%',
+            width: '10%',
             align: 'center',
-            dataIndex: 'landline'
+            dataIndex: 'telephone'
           },
-          // {
-          //   title: '手机号',
-          //   width: '12%',
-          //   align: 'center',
-          //   dataIndex: 'phone'
-          // },
           {
             title: '公司邮箱',
-            width: '15%',
+            width: '11%',
             align: 'center',
             dataIndex: 'email'
           }
@@ -213,7 +207,31 @@
 
       //删除
       handleDelete(){
-
+         if (this.selectedRowKeys.length <= 0) {
+                  this.$message.warning('请选择一条记录!');
+                  return;
+          } else {
+            var ids = "";
+            for (var a = 0; a < this.selectedRowKeys.length; a++) {
+              ids += this.selectedRowKeys[a] + ",";
+            }
+            var that = this;
+            this.$confirm({
+              title: "确认取消",
+              content: "是否删除?",
+              onOk: function () {
+                deleteAction("/sys/user/deleteCommunication", {id:ids}).then((res) => {
+                  if (res.success) {
+                    that.$message.success("删除成功!");
+                    that.loadData();
+                    that.onClearSelected();
+                  } else {
+                    that.$message.warning(res.message);
+                  }
+                });
+              }
+            });
+          }
       },
 
       // 查询职务信息