Просмотр исходного кода

feat(发文管理): 添加发文机关下拉选择功能

liujt 2 месяцев назад
Родитель
Сommit
8f4f99ec1b
1 измененных файлов с 23 добавлено и 1 удалено
  1. 23 1
      src/views/bpm/documents/noticeIssuance/index.vue

+ 23 - 1
src/views/bpm/documents/noticeIssuance/index.vue

@@ -101,6 +101,9 @@
   import documentDialog from './components/documentDialog.vue';
   import tableColumnsMixin from '@/mixins/tableColumnsMixin';
   import { noticeDocumentPageV1API, noticeDocumentDeleteAPI, batchDeleteNotice, noticeStatusChange } from '@/api/documents/noticeIssuance/index.js';
+  import {
+  listOrganizations
+} from '@/api/system/organization';
   
   export default {
     mixins: [tableColumnsMixin],
@@ -111,6 +114,7 @@
 
     data() {
       return {
+        organizationList: [],
         processSubmitDialogFlag: false,
         tabValue: '99',
         id: '',
@@ -160,7 +164,8 @@
             label: '发文机关:',
             value: 'issuingAuthorityId',
             type: 'select',
-            labelWidth: 100
+            labelWidth: 100,
+            planList: this.organizationList
           },
           {
             label: '紧急程度:',
@@ -287,12 +292,29 @@
   
     },
     created() {
+      this.getOrganizationList();
     },
     mounted() {
       this.reload();
     },
 
     methods: {
+      // 获取部门列表
+    getOrganizationList() {
+      listOrganizations()
+        .then((list) => {
+          let _list = list.filter((i) => i.name != '超级管理员');
+          // 转换为树形结构
+          this.organizationList = _list.map((i) => ({
+            label: i.name,
+            value: i.id
+          }));
+        })
+        .catch((e) => {
+          console.error('获取部门列表失败:', e);
+          this.$message.error('获取部门列表失败');
+        });
+    },
         toSubmit(res) {
           this.processSubmitDialogFlag = true;
           this.$nextTick(() => {