Browse Source

代码提交

LAPTOP-16IUEB3P\Lenovo 3 years ago
parent
commit
02e5085106

+ 8 - 88
src/views/codeManagement/components/addDialog.vue

@@ -136,6 +136,14 @@
       // this.getrecipientDep()
     },
     methods: {
+      handleClose(){
+         this.addRoleDialog = false
+         this.addForm = {
+           name: '',
+           code: '',
+           remark: ''
+         }
+      },
       open(type, row) {
         if (type == 'add') {
           this.dialogTitle = '新建编码规则';
@@ -152,23 +160,6 @@
         this.addRoleDialog = true;
         this.openType = type;
       },
-      data() {
-        return {
-          addRoleDialog: false,
-          dialogTitle: '新建编码规则',
-          addForm: {
-            name: '',
-            code: '',
-            remark: ''
-          },
-          addFormRules: {
-            name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
-            code: [{ required: true, message: '请输入编码', trigger: 'blur' }]
-          },
-          codeConfigurationList: [],
-          openType: 'add'
-        };
-      },
       submitAdd() {
         const a1 = new Promise((resolve, reject) => {
           this.$refs.addForm.validate((valid) => {
@@ -214,77 +205,6 @@
             });
         });
       },
-      methods: {
-        open(type, row) {
-          if (type == 'add') {
-            this.dialogTitle = '新建编码规则';
-            this.codeConfigurationList = [];
-          } else if (type == 'edit') {
-            this.dialogTitle = '编辑编码规则';
-            getCodeDetail(row.id).then((res) => {
-              this.addForm = { ...res };
-              if (this.addForm.codeConfigurationList)
-                delete this.addForm.codeConfigurationList;
-              this.codeConfigurationList = res.codeConfigurationList;
-            });
-          }
-          this.addRoleDialog = true;
-          this.openType = type;
-        },
-        handleClose() {
-          this.restForm();
-          this.addRoleDialog = false;
-        },
-        restForm() {
-          this.$refs.myTable.handleReset(); //清空表格校验
-          this.$refs.addForm.resetFields();
-          this.addForm = {
-            name: '',
-            code: '',
-            remark: ''
-          };
-        },
-        submitAdd() {
-          const a1 = new Promise((resolve, reject) => {
-            this.$refs.addForm.validate((valid) => {
-              if (valid) resolve();
-            });
-          });
-          const a2 = new Promise((resolve, reject) => {
-            this.$refs.myTable.validateForm((valid) => {
-              if (valid) resolve();
-            });
-          });
-          Promise.all([a1, a2]).then(() => {
-            const codeConfigurationList = this.$refs.myTable.getTableValue();
-            // codeConfigurationList.map(item=>{
-            //    item.type = item.type.code
-            // })
-            let par = {
-              code: this.addForm.code,
-              name: this.addForm.name,
-              remark: this.addForm.remark,
-              codeConfigurationList: codeConfigurationList,
-              codeManageTreeId: 1
-            };
-            if (this.openType == 'edit') {
-              par.id = this.addForm.id;
-            }
-            saveNew(par)
-              .then((res) => {
-                console.log('res', res);
-                this.loading = false;
-                this.addRoleDialog = false;
-                this.$message.success(res);
-                this.$emit('done');
-              })
-              .catch((e) => {
-                this.loading = false;
-                // this.$message.error(e.message);
-              });
-          });
-        }
-      }
     }
   };
 </script>

+ 3 - 4
src/views/ledgerAssets/boat/index.vue

@@ -11,13 +11,12 @@
              <AssetTree
                @handleNodeClick="handleNodeClick"
                @setDefault="setDefaultList"
-               :type="[2]"
+               :id="'2'"
                ref="treeList"
              />
            </div>
          </div>
          <template v-slot:content>
-           11111
            <!-- <org-user-list
              v-if="current"
              :organization-list="data"
@@ -36,7 +35,7 @@
     data () {
       return {
         // 加载状态
-        loading: true,
+        loading: false,
 
       };
     },
@@ -49,7 +48,7 @@
         // this.searchForm.classificationIds = [info.id]
         // this.handleList()
       },
-      
+
       setDefaultList(id){
         // this.searchForm.classificationIds = [id]
         // this.handleList()

+ 3 - 3
vue.config.js

@@ -2,7 +2,7 @@ const CompressionWebpackPlugin = require('compression-webpack-plugin');
 const { transformElementScss } = require('ele-admin/lib/utils/dynamic-theme');
 const path = require('path');
 
-function resolve(dir) {
+function resolve (dir) {
   return path.join(__dirname, dir);
 }
 
@@ -21,10 +21,10 @@ module.exports = {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
         // target: 'http://192.168.3.51:86', // 测试
-        // target: 'http://192.168.3.35:8080', // kang杨威
+        target: 'http://192.168.3.35:8080', // kang杨威
         // target: 'http://192.168.3.25:8080', // 黄峥嵘
         // target: 'http://192.168.3.41:8080', // 何江鹏
-        target: 'http://192.168.3.33:8080', // 谢一平
+        // target: 'http://192.168.3.33:8080', // 谢一平
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {