Przeglądaj źródła

Merge branch 'master' of https://prodog.leanwo.com:3000/prodog-client-2023/client-base-v4

# Conflicts:
#	package.json
YangZhiJie 2 lat temu
rodzic
commit
faf2e96b82
4 zmienionych plików z 27 dodań i 9 usunięć
  1. 1 1
      package.json
  2. 1 1
      src/api/department/index.js
  3. 23 7
      src/client/OrganizationEditPanel.vue
  4. 2 0
      src/index.js

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-base-v4",
   "description": "Leanwo Prodog Client",
-  "version": "3.0.61",
+  "version": "3.0.65",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "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%',
   },
   {
-    title: '公司描述',
+    title: '部门简介',
     dataIndex: 'description',
     key: 'description',
   },

+ 23 - 7
src/client/OrganizationEditPanel.vue

@@ -40,7 +40,14 @@
             }}</a>
           </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>
         </div>
       </template>
@@ -151,6 +158,7 @@ const dataSource = ref([]); // 表格部门
 const drawerTitle = ref(''); //抽屉标题
 const organization = ref({}); // 部门详情
 const editVisible = ref(false); // 抽屉开关
+const organizationId = ref(''); // 所选部门ID
 // const clientAdditionHql = ref({});
 const clientNameStr = ref('');
 const { proxy } = getCurrentInstance(); //访问this
@@ -190,7 +198,6 @@ const getClientId = (value, client) => {
 
 // 新建部门
 const createOrganization = () => {
-  console.log(clientNameStr.value, '6666');
   organization.value = {};
   organization.value.clientName = clientNameStr.value;
   organization.value.clientName = clientNameStr.value;
@@ -250,6 +257,7 @@ const getOrganization = () => {
 
 // 编辑部门
 const editOrganization = (flag, id) => {
+  organizationId.value = id;
   if (flag) {
     if (clientNameStr.value !== '') {
       editVisible.value = true;
@@ -367,7 +375,7 @@ const deleteOrganization = id => {
             );
             organization.value = undefined;
             getOrganization();
-          }else{
+          } else {
             message.error(success.errorMessage);
           }
         },
@@ -419,10 +427,18 @@ const clientValueChanged = newFieldValue => {
 
 // 上级部门change事件
 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

+ 2 - 0
src/index.js

@@ -68,6 +68,7 @@ import DateExcelReport from './client/DateExcelReport.vue';
 import DelegationReport from './client/DelegationReport.vue';
 import PrintTemp from '../src/customer/printTemp/index.vue';
 import PrintCard from '../src/print/PrintCard.vue';
+import DataArchive from '../src/archive/DataArchive.vue';
 
 
 
@@ -129,4 +130,5 @@ export {
   DelegationReport,
   PrintTemp,
   PrintCard,
+  DataArchive,
 };