xiongzhu %!s(int64=7) %!d(string=hai) anos
pai
achega
046c50bdc2

+ 0 - 2
README.md

@@ -1,6 +1,4 @@
 # 后台项目模版
-
-## 运行项目
 * IDEA 直接打开项目
 * 复制 runConfigurations 文件夹至 .idea 文件夹下
 * 运行 Install Dependencies

+ 10 - 0
runConfigurations/Install_Dependencies.xml

@@ -0,0 +1,10 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="Install Dependencies" type="js.build_tools.npm" factoryName="npm">
+    <package-json value="$PROJECT_DIR$/src/main/vue/package.json" />
+    <command value="install" />
+    <arguments value="-verbose" />
+    <node-interpreter value="project" />
+    <envs />
+    <method />
+  </configuration>
+</component>

+ 1 - 1
src/main/vue/src/main.js

@@ -137,7 +137,7 @@ const updateTableHeight = () => {
         const total = document.getElementsByTagName('main')[0].clientHeight;
         const filter = document.getElementsByClassName('filters-container')[0].clientHeight;
         const page = document.getElementsByClassName('pagination-wrapper')[0].clientHeight;
-        store.commit('updateTableHeight', total - filter - page - 43);
+        store.commit('updateTableHeight', total - filter - page - 44);
     } catch (e) {
         // console.error(e)
     }

+ 54 - 39
src/main/vue/src/pages/User.vue

@@ -21,26 +21,40 @@
                     </el-option>
                 </el-select>
             </el-form-item>
-         <!--   <el-form-item label="所属部门">
-                <el-cascader
-                    v-model="departId"
-                    :options="departs"
-                    change-on-select
-                    :show-all-levels="false"
-                    style="width: 70%"
-                ></el-cascader>
-            </el-form-item>-->
-            <el-form-item prop="departId" label="选择所属部门">
-                <el-select v-model="departId"  filterable clearable  placeholder="请选择"  style="width: 100%;">
+            <!--   <el-form-item label="所属部门">
+                   <el-cascader
+                       v-model="departId"
+                       :options="departs"
+                       change-on-select
+                       :show-all-levels="false"
+                       style="width: 70%"
+                   ></el-cascader>
+               </el-form-item>-->
+            <el-form-item prop="departId" label="部门">
+                <el-select v-model="departId" filterable clearable placeholder="请选择" style="width: 100%;">
                     <el-option
                         v-for="item in departs"
                         :key="item.departName"
                         :label="item.departName"
-                        :value="item.id"
-                    >
+                        :value="item.id">
                     </el-option>
                 </el-select>
             </el-form-item>
+            <el-form-item prop="birthday" label="生日">
+                <el-date-picker
+                    v-model="formData.birthday"
+                    format="yyyy-MM-dd"
+                    value-format="timestamp">
+                </el-date-picker>
+            </el-form-item>
+            <el-form-item prop="createTime" label="创建时间">
+                <el-date-picker
+                    v-model="formData.createTime"
+                    type="datetime"
+                    format="yyyy-MM-dd HH:mm:ss"
+                    value-format="timestamp">
+                </el-date-picker>
+            </el-form-item>
             <el-form-item>
                 <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
                 <el-button @click="$router.go(-1)">取消</el-button>
@@ -50,6 +64,7 @@
 </template>
 <script>
     import formValidator from '../formValidator'
+
     export default {
         created() {
             if (this.$route.query.id) {
@@ -66,7 +81,7 @@
                             res.data.roleId = []
                         }
                         this.formData = res.data;
-                        this.departId=res.data.departId;
+                        this.departId = res.data.departId;
                     }
                 })
             }
@@ -85,29 +100,29 @@
                     this.departs = res.data;
                 }
             })
-         /*   this.$http.get({
-                url: '../userInfo/departInfoTree',
-                data: {
-                    includeParent:1
-                }
-            }).then(res => {
-                if (res.success) {
-                    const parse = (list) => {
-                        if (list) {
-                            list.forEach(t => {
-                                t.value = t.id;
-                                t.label = t.name + "(" + t.id + ")";
-                                if (t.children && t.children.length > 0) {
-                                    parse(t.children)
-                                }
-                            })
-                        }
-                        return list;
-                    }
+            /*   this.$http.get({
+                   url: '../userInfo/departInfoTree',
+                   data: {
+                       includeParent:1
+                   }
+               }).then(res => {
+                   if (res.success) {
+                       const parse = (list) => {
+                           if (list) {
+                               list.forEach(t => {
+                                   t.value = t.id;
+                                   t.label = t.name + "(" + t.id + ")";
+                                   if (t.children && t.children.length > 0) {
+                                       parse(t.children)
+                                   }
+                               })
+                           }
+                           return list;
+                       }
 
-                    this.departs = parse(res.data.pp);
-                };
-            })*/
+                       this.departs = parse(res.data.pp);
+                   };
+               })*/
         },
         data() {
             return {
@@ -139,8 +154,8 @@
                     ]
                 },
                 roles: [],
-                departs:[],
-                departId:''
+                departs: [],
+                departId: ''
             }
         },
         methods: {
@@ -155,7 +170,7 @@
             },
             submit() {
                 var data = JSON.parse(JSON.stringify(this.formData));
-                data.departId=this.departId;
+                data.departId = this.departId;
                 this.$http.post({
                     url: this.formData.id ? '/userInfo/update' : '/userInfo/save',
                     data: data