Explorar el Código

Merge branch 'master' of http://git.zthymaoyi.com/gongdc/kouzhao

gongdecai hace 2 años
padre
commit
fae12663fc

+ 3 - 0
package-lock.json

@@ -0,0 +1,3 @@
+{
+  "lockfileVersion": 1
+}

+ 5 - 5
unimall-admin/config/dev.env.js

@@ -1,6 +1,6 @@
 module.exports = {
-	NODE_ENV: '"development"',
-  ENV_CONFIG: '"dev"',
-    HOST: '"http://localhost:8181"',
-    BASE_API: '"http://localhost:8181/m.api"'
-}
+    NODE_ENV: '"development"',
+    ENV_CONFIG: '"dev"',
+    HOST: '"http://192.168.110.82:8181"',
+    BASE_API: '"http://192.168.110.82:8181/m.api"'
+}

+ 41 - 143
unimall-admin/src/router/route.json

@@ -1,151 +1,49 @@
 [
-	
-	{
-		"redirect": "noredirect",
-		"path": "/sys",
-		"children": [
-			{
-				"path": "admin",
-				"meta": {
-					"noCache": true,
-					"icon": "admin",
-					"perms": [
-						"admin:admin:list",
-						"admin:admin:create",
-						"admin:admin:update",
-						"admin:admin:delete"
-					],
-					"title": "管理员"
-				},
-				"name": "admin",
-				"page": "/sys/admin"
-			},{
-				"path": "role",
-				"meta": {
-					"noCache": true,
-					"icon": "role",
-					"perms": [
-						"admin:role:list",
-						"admin:role:create",
-						"admin:role:delete",
-						"admin:role:update",
-						"admin:role:permissionList",
-						"admin:permission:list"
-					],
-					"title": "角色管理"
-				},
-				"name": "role",
-				"page": "/sys/role"
-			}
-		],
-		"meta": {
-			"icon": "sys",
-			"title": "系统管理"
-		},
-		"name": "sysManage",
-		"alwaysShow": true
-	},
-	{
+
+    {
         "redirect": "noredirect",
-        "name": "sysTools",
-        "path": "/tools",
+        "name": "mask",
+        "path": "/mask",
         "meta": {
-            "icon": "tools",
-            "title": "系统工具"
+            "icon": "log",
+            "title": "口罩管理"
         },
         "alwaysShow": true,
-        "children": [
-            {
-                "path": "api",
-                "name": "api",
-                "page": "/tools/api/api",
-                "meta": {
-                    "title": "API文档",
-                    "icon": "api",
-                    "noCache": true,
-                    "perms": [
-                        "tools:api:list"
-                    ]
-                }
-            },
-            {
-                "path": "gen",
-                "name": "gen",
-                "page": "/tools/gen",
-                "meta": {
-                    "title": "代码生成",
-                    "icon": "gen",
-                    "noCache": true,
-                    "perms": [
-                        "tools:gen:list",
-                        "tools:gen:create",
-                        "tools:gen:delete",
-                        "tools:gen:update"
-                    ]
-                }
-            },
-            {
-                "path": "gen/edit/:tableId(\\d+)",
-                "hidden": true,
-                "meta": {
-                    "noCache": true,
-                    "perms": [],
-                    "title": "配置项修改"
-                },
-                "name": "genEdit",
-                "page": "/tools/gen/editTable"
+        "children": [{
+            "path": "mask",
+            "name": "mask",
+            "page": "/kouzhao/kouzhaoInfo/index",
+            "meta": {
+                "title": "自定义口罩",
+                "icon": "logininfor",
+                "noCache": true,
+                "perms": [
+                    "log:logininfor:list",
+                    "log:logininfor:create",
+                    "log:logininfor:delete",
+                    "log:logininfor:update"
+                ]
             }
-
-        ]
+        }]
+    },
+    {
+        "redirect": "noredirect",
+        "path": "/profile",
+        "hidden": true,
+        "children": [{
+            "path": "password",
+            "meta": {
+                "noCache": true,
+                "title": "修改密码"
+            },
+            "name": "password",
+            "page": "/profile/password"
+        }],
+        "alwaysShow": true
     },
-	{
-		"redirect": "noredirect",
-		"name": "sysLog",
-		"path": "/log",
-		"meta": {
-			"icon": "log",
-			"title": "日志管理"
-		},
-		"alwaysShow": true,
-		"children": [
-			{
-				"path": "logininfor",
-				"name": "logininfor",
-				"page": "/log/logininfor",
-				"meta": {
-					"title": "登陆日志",
-					"icon": "logininfor",
-					"noCache": true,
-					"perms": [
-						"log:logininfor:list",
-						"log:logininfor:create",
-						"log:logininfor:delete",
-						"log:logininfor:update"
-					]
-				}
-			}
-		]
-	},
-	{
-		"redirect": "noredirect",
-		"path": "/profile",
-		"hidden": true,
-		"children": [
-			{
-				"path": "password",
-				"meta": {
-					"noCache": true,
-					"title": "修改密码"
-				},
-				"name": "password",
-				"page": "/profile/password"
-			}
-		],
-		"alwaysShow": true
-	},
-	{
-		"redirect": "/404",
-		"path": "*",
-		"hidden": true
-	}
+    {
+        "redirect": "/404",
+        "path": "*",
+        "hidden": true
+    }
 ]

+ 80 - 147
unimall-admin/src/views/kouzhao/kouzhaoInfo/index.vue

@@ -1,15 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
-      <el-form-item label="" prop="userId">
-        <el-input
-          v-model="queryParams.userId"
-          placeholder="请输入"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+    <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
+
       <el-form-item label="编号" prop="numberOrder">
         <el-input
           v-model="queryParams.numberOrder"
@@ -19,40 +11,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="昵称" prop="name">
-        <el-input
-          v-model="queryParams.name"
-          placeholder="请输入昵称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="电话" prop="phone">
-        <el-input
-          v-model="queryParams.phone"
-          placeholder="请输入电话"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="" prop="gmtUpdate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.gmtUpdate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="" prop="gmtCreate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.gmtCreate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择">
-        </el-date-picker>
-      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -61,42 +19,13 @@
 
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button
-          type="primary"
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-permission="['kouzhao:kouzhaoInfo:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-permission="['kouzhao:kouzhaoInfo:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-permission="['kouzhao:kouzhaoInfo:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
+        <!-- <el-button
+          v-permission="['kouzhao:kouzhaoInfo:export']"
           type="warning"
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          v-permission="['kouzhao:kouzhaoInfo:export']"
-        >导出</el-button>
+        >导出</el-button> -->
       </el-col>
     </el-row>
 
@@ -122,23 +51,23 @@
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
+            v-permission="['kouzhao:kouzhaoInfo:edit']"
             size="mini"
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-permission="['kouzhao:kouzhaoInfo:edit']"
           >修改</el-button>
           <el-button
+            v-permission="['kouzhao:kouzhaoInfo:remove']"
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-permission="['kouzhao:kouzhaoInfo:remove']"
           >删除</el-button>
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
       v-show="total>0"
       :total="total"
@@ -169,20 +98,24 @@
           <el-input v-model="form.lituUrl" type="textarea" placeholder="请输入内容" />
         </el-form-item>
         <el-form-item label="" prop="gmtUpdate">
-          <el-date-picker clearable size="small" style="width: 200px"
+          <el-date-picker
             v-model="form.gmtUpdate"
+            clearable
+            size="small"
+            style="width: 200px"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择">
-          </el-date-picker>
+            placeholder="选择"/>
         </el-form-item>
         <el-form-item label="" prop="gmtCreate">
-          <el-date-picker clearable size="small" style="width: 200px"
+          <el-date-picker
             v-model="form.gmtCreate"
+            clearable
+            size="small"
+            style="width: 200px"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择">
-          </el-date-picker>
+            placeholder="选择"/>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -194,7 +127,7 @@
 </template>
 
 <script>
-import { listKouzhaoInfo, getKouzhaoInfo, delKouzhaoInfo, addKouzhaoInfo, updateKouzhaoInfo, exportKouzhaoInfo } from "@/api/kouzhao/kouzhaoInfo";
+import { listKouzhaoInfo, getKouzhaoInfo, delKouzhaoInfo, addKouzhaoInfo, updateKouzhaoInfo, exportKouzhaoInfo } from '@/api/kouzhao/kouzhaoInfo'
 
 export default {
   data() {
@@ -212,7 +145,7 @@ export default {
       // 口罩信息表格数据
       kouzhaoInfoList: [],
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -233,31 +166,31 @@ export default {
       // 表单校验
       rules: {
         userId: [
-          { required: true, message: "不能为空", trigger: "blur" }
-        ],        gmtUpdate: [
-          { required: true, message: "不能为空", trigger: "blur" }
-        ],        gmtCreate: [
-          { required: true, message: "不能为空", trigger: "blur" }
-        ]      }
-    };
+          { required: true, message: '不能为空', trigger: 'blur' }
+        ], gmtUpdate: [
+          { required: true, message: '不能为空', trigger: 'blur' }
+        ], gmtCreate: [
+          { required: true, message: '不能为空', trigger: 'blur' }
+        ] }
+    }
   },
   created() {
-    this.getList();
+    this.getList()
   },
   methods: {
     /** 查询口罩信息列表 */
     getList() {
-      this.loading = true;
+      this.loading = true
       listKouzhaoInfo(this.queryParams).then(response => {
         this.kouzhaoInfoList = response.data.data.items
         this.total = response.data.data.count
-        this.loading = false;
-      });
+        this.loading = false
+      })
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
+      this.open = false
+      this.reset()
     },
     // 表单重置
     reset() {
@@ -271,18 +204,18 @@ export default {
         lituUrl: undefined,
         gmtUpdate: undefined,
         gmtCreate: undefined
-      };
-      this.resetForm("form");
+      }
+      this.resetForm('form')
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.queryParams.pageNum = 1
+      this.getList()
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
@@ -292,75 +225,75 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加口罩信息";
+      this.reset()
+      this.open = true
+      this.title = '添加口罩信息'
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
+      this.reset()
       const id = row.id || this.ids.join(',')
       getKouzhaoInfo(id).then(response => {
         this.form = response.data.data
-        this.open = true;
-        this.title = "修改口罩信息";
-      });
+        this.open = true
+        this.title = '修改口罩信息'
+      })
     },
     /** 提交按钮 */
     submitForm: function() {
-      this.$refs["form"].validate(valid => {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           if (this.form.id != undefined) {
             updateKouzhaoInfo(this.form).then(response => {
               if (response.data) {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
+                this.msgSuccess('修改成功')
+                this.open = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           } else {
             addKouzhaoInfo(this.form).then(response => {
               if (response.data) {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
+                this.msgSuccess('新增成功')
+                this.open = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           }
         }
-      });
+      })
     },
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids.join(',')
-      this.$confirm('是否确认删除口罩信息编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delKouzhaoInfo(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(function() {});
+      this.$confirm('是否确认删除口罩信息编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delKouzhaoInfo(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(function() {})
     },
     /** 导出按钮操作 */
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有口罩信息数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportKouzhaoInfo(queryParams);
-        }).then(response => {
-          this.download(response.data.data);
-        }).catch(function() {});
+      const queryParams = this.queryParams
+      this.$confirm('是否确认导出所有口罩信息数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return exportKouzhaoInfo(queryParams)
+      }).then(response => {
+        this.download(response.data.data)
+      }).catch(function() {})
     }
   }
-};
-</script>
+}
+</script>

+ 2 - 2
unimall-admin/src/views/layout/components/Navbar.vue

@@ -79,8 +79,8 @@ export default {
     },
     logout() {
       this.$store.dispatch('LogOut').then(() => {
-        window.location.href = 'http://106.14.75.12:9999/'
-        // location.reload() // In order to re-instantiate the vue-router object to avoid bugs
+        // window.location.href = 'http://106.14.75.12:9999/'
+        location.reload() // In order to re-instantiate the vue-router object to avoid bugs
       })
     }
   }