liuyanpeng пре 2 година
родитељ
комит
b30b82875f

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
 {
   "name": "client-base-v4",
   "name": "client-base-v4",
   "description": "Leanwo Prodog Client",
   "description": "Leanwo Prodog Client",
-  "version": "3.0.62",
+  "version": "3.0.64",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
   "scripts": {
     "dev": "cross-env webpack serve --config ./webpack.dev.js",
     "dev": "cross-env webpack serve --config ./webpack.dev.js",

+ 1 - 1
src/api/department/index.js

@@ -13,7 +13,7 @@ export const columns = [
     width:'20%',
     width:'20%',
   },
   },
   {
   {
-    title: '公司描述',
+    title: '部门简介',
     dataIndex: 'description',
     dataIndex: 'description',
     key: 'description',
     key: 'description',
   },
   },

+ 23 - 7
src/client/OrganizationEditPanel.vue

@@ -40,7 +40,14 @@
             }}</a>
             }}</a>
           </span>
           </span>
           <span>
           <span>
-            <a style="color: red" @click="deleteOrganization(record.key)">删除</a>
+            <a-popconfirm
+              title="确定删除吗!"
+              ok-text="确定"
+              cancel-text="取消"
+              @confirm="deleteOrganization(record.key)"
+            >
+              <a style="color: red">删除</a>
+            </a-popconfirm>
           </span>
           </span>
         </div>
         </div>
       </template>
       </template>
@@ -151,6 +158,7 @@ const dataSource = ref([]); // 表格部门
 const drawerTitle = ref(''); //抽屉标题
 const drawerTitle = ref(''); //抽屉标题
 const organization = ref({}); // 部门详情
 const organization = ref({}); // 部门详情
 const editVisible = ref(false); // 抽屉开关
 const editVisible = ref(false); // 抽屉开关
+const organizationId = ref(''); // 所选部门ID
 // const clientAdditionHql = ref({});
 // const clientAdditionHql = ref({});
 const clientNameStr = ref('');
 const clientNameStr = ref('');
 const { proxy } = getCurrentInstance(); //访问this
 const { proxy } = getCurrentInstance(); //访问this
@@ -190,7 +198,6 @@ const getClientId = (value, client) => {
 
 
 // 新建部门
 // 新建部门
 const createOrganization = () => {
 const createOrganization = () => {
-  console.log(clientNameStr.value, '6666');
   organization.value = {};
   organization.value = {};
   organization.value.clientName = clientNameStr.value;
   organization.value.clientName = clientNameStr.value;
   organization.value.clientName = clientNameStr.value;
   organization.value.clientName = clientNameStr.value;
@@ -250,6 +257,7 @@ const getOrganization = () => {
 
 
 // 编辑部门
 // 编辑部门
 const editOrganization = (flag, id) => {
 const editOrganization = (flag, id) => {
+  organizationId.value = id;
   if (flag) {
   if (flag) {
     if (clientNameStr.value !== '') {
     if (clientNameStr.value !== '') {
       editVisible.value = true;
       editVisible.value = true;
@@ -367,7 +375,7 @@ const deleteOrganization = id => {
             );
             );
             organization.value = undefined;
             organization.value = undefined;
             getOrganization();
             getOrganization();
-          }else{
+          } else {
             message.error(success.errorMessage);
             message.error(success.errorMessage);
           }
           }
         },
         },
@@ -419,10 +427,18 @@ const clientValueChanged = newFieldValue => {
 
 
 // 上级部门change事件
 // 上级部门change事件
 const parentOrganizationValueChanged = newFieldValue => {
 const parentOrganizationValueChanged = newFieldValue => {
-  console.log(newFieldValue, '555555555555555555');
-  parentOrganizationFieldValue.value = newFieldValue;
-  organization.value.parentId = newFieldValue.id;
-  organization.value.parentName = newFieldValue.displayValue[0];
+  if (organizationId.value == newFieldValue.id) {
+    message.warning('不能将自己作为上级部门!');
+    parentOrganizationFieldValue.value = {
+      displayValue: [],
+      fieldType: 'Key',
+      id: null,
+    };
+  } else {
+    parentOrganizationFieldValue.value = newFieldValue;
+    organization.value.parentId = newFieldValue.id;
+    organization.value.parentName = newFieldValue.displayValue[0];
+  }
 };
 };
 
 
 // 递归将childrenOrganizations赋值给children
 // 递归将childrenOrganizations赋值给children

+ 1 - 1
src/window/tabFormWidget/ImageListViewWidget.vue

@@ -203,7 +203,7 @@ export default {
       } else {
       } else {
         return '';
         return '';
       }
       }
-    }
+    },
   },
   },
 };
 };
 </script>
 </script>