浏览代码

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/admin into dev

wangfei 6 年前
父节点
当前提交
f486f2664f

+ 1
- 1
dist/index.html 查看文件

1
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_25hulf12ph6.css><title>城的空间后台管理系统</title><link href=./static/css/app.8d9257cdf3036eec0434d40e02dd8bb5.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.7e921535e20f729cf046.js></script><script type=text/javascript src=./static/js/app.fb70b4505d8b5473f866.js></script></body></html>
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><title>城的空间后台管理系统</title><link href=./static/css/app.17827823c93d74dee7e46991e4110b0f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.992319e39e0ff64940a3.js></script><script type=text/javascript src=./static/js/app.20d40803890c09bdb1f5.js></script></body></html>

+ 1
- 1
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map 查看文件

1
-{"version":3,"sources":["webpack:///webpack/bootstrap 3848669c23aacae56823"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3848669c23aacae56823"],"sourceRoot":""}
1
+{"version":3,"sources":["webpack:///webpack/bootstrap 1489349eb84498198675"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 1489349eb84498198675"],"sourceRoot":""}

+ 31
- 0
package-lock.json 查看文件

2969
         "sha.js": "2.4.11"
2969
         "sha.js": "2.4.11"
2970
       }
2970
       }
2971
     },
2971
     },
2972
+    "cross-env": {
2973
+      "version": "5.2.0",
2974
+      "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.0.tgz",
2975
+      "integrity": "sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==",
2976
+      "dev": true,
2977
+      "requires": {
2978
+        "cross-spawn": "6.0.5",
2979
+        "is-windows": "1.0.2"
2980
+      },
2981
+      "dependencies": {
2982
+        "cross-spawn": {
2983
+          "version": "6.0.5",
2984
+          "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
2985
+          "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
2986
+          "dev": true,
2987
+          "requires": {
2988
+            "nice-try": "1.0.5",
2989
+            "path-key": "2.0.1",
2990
+            "semver": "5.5.0",
2991
+            "shebang-command": "1.2.0",
2992
+            "which": "1.3.1"
2993
+          }
2994
+        }
2995
+      }
2996
+    },
2972
     "cross-spawn": {
2997
     "cross-spawn": {
2973
       "version": "5.1.0",
2998
       "version": "5.1.0",
2974
       "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
2999
       "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
9413
       "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
9438
       "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
9414
       "dev": true
9439
       "dev": true
9415
     },
9440
     },
9441
+    "nice-try": {
9442
+      "version": "1.0.5",
9443
+      "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
9444
+      "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
9445
+      "dev": true
9446
+    },
9416
     "nightwatch": {
9447
     "nightwatch": {
9417
       "version": "0.9.21",
9448
       "version": "0.9.21",
9418
       "resolved": "https://registry.npmjs.org/nightwatch/-/nightwatch-0.9.21.tgz",
9449
       "resolved": "https://registry.npmjs.org/nightwatch/-/nightwatch-0.9.21.tgz",

+ 8
- 0
src/pages/login/index.vue 查看文件

58
   },
58
   },
59
   mounted () {
59
   mounted () {
60
     this.$nextTick(function () {
60
     this.$nextTick(function () {
61
+      var _that = this
61
       this.initLogin()
62
       this.initLogin()
63
+      document.onkeydown = function (event) {
64
+        var e = event || window.event
65
+        var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode
66
+        if (keyCode === 13) {
67
+          _that.toLogin()
68
+        }
69
+      }
62
     })
70
     })
63
   },
71
   },
64
   methods: {
72
   methods: {

+ 10
- 5
src/pages/system/cardAndCouponManager/cardManager/edit.vue 查看文件

447
         })
447
         })
448
         return false
448
         return false
449
       }
449
       }
450
+      return true
450
     },
451
     },
451
     submit () { // 保存
452
     submit () { // 保存
452
-      if (!this.checkInfo()) {
453
-        return false
454
-      }
455
       if (this.$route.query.id) {
453
       if (this.$route.query.id) {
456
         if (this.date !== '') {
454
         if (this.date !== '') {
457
           this.cardInfo.StartDate = this.date[0]
455
           this.cardInfo.StartDate = this.date[0]
458
           this.cardInfo.EndDate = this.date[1]
456
           this.cardInfo.EndDate = this.date[1]
459
         }
457
         }
458
+        this.courseList = this.courseList || []
460
         for (var x = 0; x < this.courseList.length; x++) {
459
         for (var x = 0; x < this.courseList.length; x++) {
461
           if (this.courseList[x].CourseId === this.cardInfo.Targets[0].TargetId) {
460
           if (this.courseList[x].CourseId === this.cardInfo.Targets[0].TargetId) {
462
             this.cardInfo.Targets[0].TargetType = this.courseList[x].CourseType
461
             this.cardInfo.Targets[0].TargetType = this.courseList[x].CourseType
464
           }
463
           }
465
         }
464
         }
466
         this.cardInfo.TotalCount = this.cardInfo.TotalCount - 0
465
         this.cardInfo.TotalCount = this.cardInfo.TotalCount - 0
466
+        if (!this.checkInfo()) {
467
+          return false
468
+        }
467
         this.editCard(this.cardInfo).then((res) => {
469
         this.editCard(this.cardInfo).then((res) => {
468
           this.$message({
470
           this.$message({
469
             type: 'success',
471
             type: 'success',
477
           this.cardInfo.StartDate = this.date[0]
479
           this.cardInfo.StartDate = this.date[0]
478
           this.cardInfo.EndDate = this.date[1]
480
           this.cardInfo.EndDate = this.date[1]
479
         }
481
         }
482
+        this.courseList = this.courseList || []
480
         for (var n = 0; n < this.courseList.length; n++) {
483
         for (var n = 0; n < this.courseList.length; n++) {
481
           if (this.courseList[n].CourseId === this.cardInfo.Targets[0].TargetId) {
484
           if (this.courseList[n].CourseId === this.cardInfo.Targets[0].TargetId) {
482
             this.cardInfo.Targets[0].TargetType = this.courseList[n].CourseType
485
             this.cardInfo.Targets[0].TargetType = this.courseList[n].CourseType
484
           }
487
           }
485
         }
488
         }
486
         this.cardInfo.TotalCount = this.cardInfo.TotalCount - 0
489
         this.cardInfo.TotalCount = this.cardInfo.TotalCount - 0
487
-        // console.log(JSON.stringify(this.cardInfo))
490
+        if (!this.checkInfo()) {
491
+          return false
492
+        }
488
         this.addCard(this.cardInfo).then((res) => {
493
         this.addCard(this.cardInfo).then((res) => {
489
           this.$message({
494
           this.$message({
490
             type: 'success',
495
             type: 'success',
495
       }
500
       }
496
     },
501
     },
497
     cancel () { // 取消
502
     cancel () { // 取消
498
-      this.$router.push({ name: 'couponList' })
503
+      this.$router.push({ name: 'cardList' })
499
     },
504
     },
500
     handleAvatarSuccess (res, file) {
505
     handleAvatarSuccess (res, file) {
501
       if ((this.cardInfo.Images || []).length > 0) {
506
       if ((this.cardInfo.Images || []).length > 0) {

+ 7
- 3
src/pages/system/cardAndCouponManager/couponManager/edit.vue 查看文件

679
         })
679
         })
680
         return false
680
         return false
681
       }
681
       }
682
+      return true
682
     },
683
     },
683
     submit () { // 保存
684
     submit () { // 保存
684
-      if (!this.checkInfo()) {
685
-        return false
686
-      }
687
       if (this.$route.query.id) {
685
       if (this.$route.query.id) {
688
         if (this.couponInfo.ValidDays) {
686
         if (this.couponInfo.ValidDays) {
689
           this.couponInfo.StartDate = undefined
687
           this.couponInfo.StartDate = undefined
690
           this.couponInfo.EndDate = undefined
688
           this.couponInfo.EndDate = undefined
691
         }
689
         }
690
+        if (!this.checkInfo()) {
691
+          return false
692
+        }
692
         this.editCoupon({
693
         this.editCoupon({
693
           ...this.couponInfo,
694
           ...this.couponInfo,
694
           IsAll: this.couponInfo.IsAll - 0,
695
           IsAll: this.couponInfo.IsAll - 0,
707
           this.couponInfo.StartDate = undefined
708
           this.couponInfo.StartDate = undefined
708
           this.couponInfo.EndDate = undefined
709
           this.couponInfo.EndDate = undefined
709
         }
710
         }
711
+        if (!this.checkInfo()) {
712
+          return false
713
+        }
710
         this.addCoupon({
714
         this.addCoupon({
711
           ...this.couponInfo,
715
           ...this.couponInfo,
712
           IsAll: this.couponInfo.IsAll - 0,
716
           IsAll: this.couponInfo.IsAll - 0,

+ 32
- 4
src/pages/system/caseManager/deviceManager/add.vue 查看文件

3
     <form class="mainForm">
3
     <form class="mainForm">
4
       <ul>
4
       <ul>
5
          <li class="flex-h">
5
          <li class="flex-h">
6
-          <span>选择案场:</span>
6
+          <span>选择案场:<em>*</em></span>
7
           <div class="flex-item">
7
           <div class="flex-item">
8
             <div style="width:50%">
8
             <div style="width:50%">
9
               <el-select v-model="Case" placeholder="请选择">
9
               <el-select v-model="Case" placeholder="请选择">
18
           </div>
18
           </div>
19
         </li>
19
         </li>
20
         <li class="flex-h">
20
         <li class="flex-h">
21
-          <span>设备名称:</span>
21
+          <span>设备名称:<em>*</em></span>
22
           <div class="flex-item">
22
           <div class="flex-item">
23
             <div style="width:50%">
23
             <div style="width:50%">
24
               <el-input
24
               <el-input
30
           </div>
30
           </div>
31
         </li>
31
         </li>
32
         <li class="flex-h">
32
         <li class="flex-h">
33
-          <span>设备Code:</span>
33
+          <span>设备Code:<em>*</em></span>
34
           <div class="flex-item">
34
           <div class="flex-item">
35
             <div style="width:50%">
35
             <div style="width:50%">
36
               <el-input
36
               <el-input
74
         return this.detail.CaseId || this.caseid
74
         return this.detail.CaseId || this.caseid
75
       },
75
       },
76
       set (val) {
76
       set (val) {
77
-        this.UpdateInfo({...this.detail, CaseId: val})
77
+        this.UpdateInfo({ ...this.detail, CaseId: val })
78
       }
78
       }
79
     }
79
     }
80
   },
80
   },
88
     ]),
88
     ]),
89
     submit () {
89
     submit () {
90
       if ((this.detail.EquipmentId || '') === '') {
90
       if ((this.detail.EquipmentId || '') === '') {
91
+        if ((this.detail.Name || '') === '') {
92
+          this.$message({
93
+            message: '设备名称不能为空',
94
+            type: 'error'
95
+          })
96
+          return false
97
+        }
98
+        if ((this.detail.EquipmentCode || '') === '') {
99
+          this.$message({
100
+            message: '设备Code不能为空',
101
+            type: 'error'
102
+          })
103
+          return false
104
+        }
91
         this.detail.OrgId = this.orgid
105
         this.detail.OrgId = this.orgid
92
         if (!this.detail.CaseId || this.detail.CaseId === '') {
106
         if (!this.detail.CaseId || this.detail.CaseId === '') {
93
           this.detail.CaseId = this.caseid
107
           this.detail.CaseId = this.caseid
100
           this.$router.push({ name: 'deviceManager' })
114
           this.$router.push({ name: 'deviceManager' })
101
         })
115
         })
102
       } else {
116
       } else {
117
+        if ((this.detail.Name || '') === '') {
118
+          this.$message({
119
+            message: '设备名称不能为空',
120
+            type: 'error'
121
+          })
122
+          return false
123
+        }
124
+        if ((this.detail.EquipmentCode || '') === '') {
125
+          this.$message({
126
+            message: '设备Code不能为空',
127
+            type: 'error'
128
+          })
129
+          return false
130
+        }
103
         this.UpdateDevice(this.detail).then(() => {
131
         this.UpdateDevice(this.detail).then(() => {
104
           this.$message({
132
           this.$message({
105
             type: 'success',
133
             type: 'success',

+ 19
- 2
src/pages/system/caseManager/keyManager/index.vue 查看文件

117
 </template>
117
 </template>
118
 
118
 
119
 <script>
119
 <script>
120
-import { mapState } from 'vuex'
120
+import { createNamespacedHelpers, mapState } from 'vuex'
121
+const { mapActions: mapDeviceActions } = createNamespacedHelpers('device')
121
 
122
 
122
 export default {
123
 export default {
123
   name: '',
124
   name: '',
124
   data () {
125
   data () {
125
     return {
126
     return {
127
+      currentItem: {},
126
       gridData: [],
128
       gridData: [],
127
       showCardList: false, // 显隐卡列表
129
       showCardList: false, // 显隐卡列表
128
       bindPhone: '', // 绑定手机号
130
       bindPhone: '', // 绑定手机号
158
     }
160
     }
159
   },
161
   },
160
   methods: {
162
   methods: {
163
+    ...mapDeviceActions([
164
+      'bindKeyByPhone',
165
+    ]),
161
     addKey () {
166
     addKey () {
162
       this.$router.push({ name: 'addKey' })
167
       this.$router.push({ name: 'addKey' })
163
     },
168
     },
164
     sureBindPhone () { // 确认绑定手机号
169
     sureBindPhone () { // 确认绑定手机号
165
-      this.showCardList = true
170
+      this.bindKeyByPhone({
171
+        phone: this.bindPhone,
172
+        keyid: this.currentItem.KeyId
173
+      }).then((res) => {
174
+        this.$message({
175
+          message: '操作成功',
176
+          type: 'success'
177
+        })
178
+        this.dialogTableVisible = false
179
+        this.bindPhone = ''
180
+        this.getList()
181
+      })
166
     },
182
     },
167
     search () { // 搜索
183
     search () { // 搜索
168
       this.postData.page = 1
184
       this.postData.page = 1
186
       this.getList()
202
       this.getList()
187
     },
203
     },
188
     bindItem (index, row) { // 绑定
204
     bindItem (index, row) { // 绑定
205
+      this.currentItem = row
189
       this.dialogTableVisible = true
206
       this.dialogTableVisible = true
190
     },
207
     },
191
     unBindItem (index, row) { // 解绑
208
     unBindItem (index, row) { // 解绑

+ 6
- 42
src/pages/system/cmsManager/bannerManager/edit.vue 查看文件

6
           <span>跳转类型:<em>*</em></span>
6
           <span>跳转类型:<em>*</em></span>
7
           <div class="flex-item">
7
           <div class="flex-item">
8
             <div style="width:50%" class="radio">
8
             <div style="width:50%" class="radio">
9
-                <el-radio v-model="postData.ForwardType" label='1' >链接</el-radio>
10
-                <el-radio v-model="postData.ForwardType" label='0' >课程</el-radio>
9
+                <el-radio v-model="postData.ForwardType" label='url' >链接</el-radio>
10
+                <el-radio v-model="postData.ForwardType" label='course' >课程</el-radio>
11
             </div>
11
             </div>
12
           </div>
12
           </div>
13
         </li>
13
         </li>
14
-        <li class="flex-h" v-if="postData.ForwardType==='1'">
14
+        <li class="flex-h" v-if="postData.ForwardType==='url'">
15
           <span>链接:<em>*</em></span>
15
           <span>链接:<em>*</em></span>
16
           <div class="flex-item">
16
           <div class="flex-item">
17
             <div style="width:50%">
17
             <div style="width:50%">
126
   components: {},
126
   components: {},
127
   created () {
127
   created () {
128
     this.GetCourseList({page: 1, pagesize: 100, callback: this.getDetail})
128
     this.GetCourseList({page: 1, pagesize: 100, callback: this.getDetail})
129
-    this.updateLocationInfo()
129
+    this.updateLocationAllInfo()
130
   },
130
   },
131
   computed: {
131
   computed: {
132
     ...mapState({
132
     ...mapState({
133
-      positionList: x => x.cms.location,
133
+      positionList: x => x.cms.locationAll,
134
       OrgId: x => x.app.user.OrgId,
134
       OrgId: x => x.app.user.OrgId,
135
       caseList: x => x.app.cases.list
135
       caseList: x => x.app.cases.list
136
     }),
136
     }),
142
     ...mapCourseActions([
142
     ...mapCourseActions([
143
       'GetCourseList',
143
       'GetCourseList',
144
     ]),
144
     ]),
145
-    ...mapCmsActions(['updateLocationInfo']),
145
+    ...mapCmsActions(['updateLocationAllInfo']),
146
     submit () {
146
     submit () {
147
       if (this.postData.ForwardType === 'url') {
147
       if (this.postData.ForwardType === 'url') {
148
         this.postData.ForwardResourceId = ''
148
         this.postData.ForwardResourceId = ''
188
       }
188
       }
189
       this.postData.OrgId = this.OrgId
189
       this.postData.OrgId = this.OrgId
190
       this.postData.CaseId = this.CaseId
190
       this.postData.CaseId = this.CaseId
191
-      this.postData.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'
192
-      // this.postData.ImageUrl = ''
193
-      // for (let i = 0; i < this.imgsArr.length; i++) {
194
-      //   this.postData.ImageUrl += this.imgsArr[i].response.result.url + ','
195
-      // }
196
-      // if (this.postData.ImageUrl) {
197
-      //   this.postData.ImageUrl = this.postData.ImageUrl.substr(0, this.postData.ImageUrl.length - 1)
198
-      // }
199
       this.$ajax(this.$api.cms.editImage.url, {
191
       this.$ajax(this.$api.cms.editImage.url, {
200
         method: this.$api.cms.editImage.method,
192
         method: this.$api.cms.editImage.method,
201
         data: this.postData,
193
         data: this.postData,
225
           id: this.$route.query.id
217
           id: this.$route.query.id
226
         }
218
         }
227
       }).then(res => {
219
       }).then(res => {
228
-        console.log(res)
229
         res.Status = res.Status + ''
220
         res.Status = res.Status + ''
230
-        res.ForwardType === 'url' ? res.ForwardType = '1' : res.ForwardType = '0'
231
-        // let imgsArr = []
232
-        // let item = {
233
-        //   url: res.ImageUrl,
234
-        //   response: {
235
-        //     result: {
236
-        //       url: res.ImageUrl
237
-        //     }
238
-        //   }
239
-        // }
240
-        // imgsArr.push(item)
241
-        // this.imgsArr = imgsArr
242
         this.postData = res
221
         this.postData = res
243
       }).catch(msg => {
222
       }).catch(msg => {
244
 
223
 
245
       })
224
       })
246
     },
225
     },
247
-    // handlePictureCardPreview (res, file, fileList) {
248
-    //   this.imgs = res.result.url
249
-    //   this.dialogVisible = false
250
-    //   this.imgsArr = fileList
251
-    // },
252
-    // handleRemove (file, fileList) {
253
-    //   this.imgsArr = fileList
254
-    // },
255
-    // exceed () {
256
-    //   this.$message({
257
-    //     message: '超过可传的图片上限',
258
-    //     type: 'info',
259
-    //     duration: 1000
260
-    //   })
261
-    // }
262
     handleAvatarSuccess (res, file) {
226
     handleAvatarSuccess (res, file) {
263
       this.postData.ImageUrl = res.result.url
227
       this.postData.ImageUrl = res.result.url
264
     }
228
     }

+ 3
- 8
src/pages/system/cmsManager/bannerManager/index.vue 查看文件

73
   },
73
   },
74
   computed: {
74
   computed: {
75
     ...mapState({
75
     ...mapState({
76
-      positionList: x => x.cms.location
76
+      positionList: x => x.cms.locationAll,
77
     })
77
     })
78
   },
78
   },
79
   components: {
79
   components: {
83
     this.updateSystemInfo().then(() => {
83
     this.updateSystemInfo().then(() => {
84
       this.getList()
84
       this.getList()
85
     })
85
     })
86
-    this.updateLocationInfo()
86
+    this.updateLocationAllInfo()
87
   },
87
   },
88
   methods: {
88
   methods: {
89
-    ...mapCmsActions(['updateLocationInfo']),
89
+    ...mapCmsActions(['updateLocationAllInfo']),
90
     ...mapActions(['updateSystemInfo']),
90
     ...mapActions(['updateSystemInfo']),
91
     handleCurrentChange (val) {
91
     handleCurrentChange (val) {
92
       this.postData.currentPage = val
92
       this.postData.currentPage = val
109
         })
109
         })
110
       })
110
       })
111
     },
111
     },
112
-    // searchList (key) { // 搜索列表
113
-    //   console.log(key)
114
-    // },
115
     addBanner () {
112
     addBanner () {
116
       this.$router.push({ name: 'addBanner' })
113
       this.$router.push({ name: 'addBanner' })
117
     },
114
     },
124
           pagesize: this.postData.pageSize
121
           pagesize: this.postData.pageSize
125
         }
122
         }
126
       }).then(res => {
123
       }).then(res => {
127
-        console.log(res)
128
         let length = res.list.length
124
         let length = res.list.length
129
         for (let i = 0; i < length; i++) {
125
         for (let i = 0; i < length; i++) {
130
           if (res.list[i].Status === 1) {
126
           if (res.list[i].Status === 1) {
152
           id: id
148
           id: id
153
         }
149
         }
154
       }).then(res => {
150
       }).then(res => {
155
-        console.log(res)
156
         this.$message({
151
         this.$message({
157
           type: 'success',
152
           type: 'success',
158
           message: '删除成功!'
153
           message: '删除成功!'

+ 4
- 2
src/pages/system/cmsManager/newsManager/add.vue 查看文件

27
           <span>课程:<em>*</em></span>
27
           <span>课程:<em>*</em></span>
28
           <div class="flex-item">
28
           <div class="flex-item">
29
             <div style="width:50%">
29
             <div style="width:50%">
30
-              <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
30
+              <el-select v-model="postData.ForwardCourseId" placeholder="请选择课程">
31
                 <el-option
31
                 <el-option
32
                   v-for="item in courses.list"
32
                   v-for="item in courses.list"
33
                   :key="item.CourseId"
33
                   :key="item.CourseId"
137
       positionList: x => x.cms.locationAll,
137
       positionList: x => x.cms.locationAll,
138
       OrgId: x => x.app.user.OrgId,
138
       OrgId: x => x.app.user.OrgId,
139
       CaseId: x => x.app.cases.default,
139
       CaseId: x => x.app.cases.default,
140
+      defaultCaseId: x => x.app.cases.default,
140
     }),
141
     }),
141
     ...mapCourseState({
142
     ...mapCourseState({
142
       courses: x => x.courseList,
143
       courses: x => x.courseList,
171
         }
172
         }
172
       } else {
173
       } else {
173
         this.postData.ForwardUrl = ''
174
         this.postData.ForwardUrl = ''
174
-        if (this.postData.ForwardResourceId === '') {
175
+        if (this.postData.ForwardCourseId === '') {
175
           this.$message({
176
           this.$message({
176
             message: '课程不能为空',
177
             message: '课程不能为空',
177
             type: 'error',
178
             type: 'error',
200
         })
201
         })
201
         return false
202
         return false
202
       }
203
       }
204
+      this.postData.CaseId = this.defaultCaseId
203
       this.postData.locationids = this.postData.LocationIds.join(',')
205
       this.postData.locationids = this.postData.LocationIds.join(',')
204
       this.$ajax(this.$api.cms.addNews.url, {
206
       this.$ajax(this.$api.cms.addNews.url, {
205
         method: this.$api.cms.addNews.method,
207
         method: this.$api.cms.addNews.method,

+ 10
- 3
src/pages/system/cmsManager/newsManager/edit.vue 查看文件

27
           <span>课程:<em>*</em></span>
27
           <span>课程:<em>*</em></span>
28
           <div class="flex-item">
28
           <div class="flex-item">
29
             <div style="width:50%">
29
             <div style="width:50%">
30
-              <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
30
+              <el-select v-model="postData.ForwardCourseId" placeholder="请选择课程">
31
                 <el-option
31
                 <el-option
32
                   v-for="item in courses.list"
32
                   v-for="item in courses.list"
33
                   :key="item.CourseId"
33
                   :key="item.CourseId"
100
 <script>
100
 <script>
101
 import { mapState, createNamespacedHelpers } from 'vuex'
101
 import { mapState, createNamespacedHelpers } from 'vuex'
102
 const { mapActions: mapCmsActions } = createNamespacedHelpers('cms')
102
 const { mapActions: mapCmsActions } = createNamespacedHelpers('cms')
103
+const { mapState: mapCourseState, mapActions: mapCourseActions } = createNamespacedHelpers('course')
103
 export default {
104
 export default {
104
   name: '',
105
   name: '',
105
   data () {
106
   data () {
125
   created () {
126
   created () {
126
     this.updateLocationInfo().then(() => {
127
     this.updateLocationInfo().then(() => {
127
       this.getDetail()
128
       this.getDetail()
129
+      this.GetCourseList({ page: 1, pagesize: 10000 })
128
     })
130
     })
129
   },
131
   },
130
   computed: {
132
   computed: {
131
     ...mapState({
133
     ...mapState({
132
       positionList: x => x.cms.location
134
       positionList: x => x.cms.location
135
+    }),
136
+    ...mapCourseState({
137
+      courses: x => x.courseList,
133
     })
138
     })
134
   },
139
   },
135
   methods: {
140
   methods: {
141
+    ...mapCourseActions([
142
+      'GetCourseList',
143
+    ]),
136
     ...mapCmsActions(['updateLocationInfo']),
144
     ...mapCmsActions(['updateLocationInfo']),
137
     submit () {
145
     submit () {
138
       if (this.postData.ForwardType === 'url') {
146
       if (this.postData.ForwardType === 'url') {
155
         }
163
         }
156
       } else {
164
       } else {
157
         this.postData.ForwardUrl = ''
165
         this.postData.ForwardUrl = ''
158
-        if (this.postData.ForwardResourceId === '') {
166
+        if (this.postData.ForwardCourseId === '') {
159
           this.$message({
167
           this.$message({
160
             message: '课程不能为空',
168
             message: '课程不能为空',
161
             type: 'error',
169
             type: 'error',
214
           id: this.$route.query.id
222
           id: this.$route.query.id
215
         }
223
         }
216
       }).then(res => {
224
       }).then(res => {
217
-        res.ForwardType === 'url' ? res.ForwardType = '1' : res.ForwardType = '0'
218
         res.Status += ''
225
         res.Status += ''
219
         res.LocationIds = res.NewsLocations.reduce((previousValue, currentValue, index, array) => {
226
         res.LocationIds = res.NewsLocations.reduce((previousValue, currentValue, index, array) => {
220
           previousValue.push(currentValue.LocationId)
227
           previousValue.push(currentValue.LocationId)

+ 33
- 5
src/pages/system/courseManager/fiveA/add.vue 查看文件

3
     <form class="mainForm">
3
     <form class="mainForm">
4
       <ul>
4
       <ul>
5
         <li class="flex-h">
5
         <li class="flex-h">
6
-          <span>名称:</span>
6
+          <span>名称:<em>*</em></span>
7
           <div class="flex-item">
7
           <div class="flex-item">
8
             <div style="width:50%">
8
             <div style="width:50%">
9
               <el-input
9
               <el-input
15
           </div>
15
           </div>
16
         </li>
16
         </li>
17
         <li class="flex-h">
17
         <li class="flex-h">
18
-          <span>标题:</span>
18
+          <span>标题:<em>*</em></span>
19
           <div class="flex-item">
19
           <div class="flex-item">
20
             <div style="width:50%">
20
             <div style="width:50%">
21
               <el-input
21
               <el-input
27
           </div>
27
           </div>
28
         </li>
28
         </li>
29
         <li class="flex-h">
29
         <li class="flex-h">
30
-          <span>资讯分类:</span>
30
+          <span>资讯分类:<em>*</em></span>
31
           <div class="flex-item">
31
           <div class="flex-item">
32
             <div style="width:50%">
32
             <div style="width:50%">
33
               <el-input
33
               <el-input
39
           </div>
39
           </div>
40
         </li>
40
         </li>
41
         <li class="flex-h">
41
         <li class="flex-h">
42
-          <span>图片:</span>
42
+          <span>图片:<em>*</em></span>
43
           <div class="flex-item">
43
           <div class="flex-item">
44
             <el-upload
44
             <el-upload
45
               action='string'
45
               action='string'
103
   methods: {
103
   methods: {
104
     ...mapActions(['updateSystemInfo']),
104
     ...mapActions(['updateSystemInfo']),
105
     submit () {
105
     submit () {
106
+      if (this.postData.LocationName === '') {
107
+        this.$message({
108
+          type: 'error',
109
+          message: '名称不能为空'
110
+        })
111
+        return false
112
+      }
113
+      if (this.postData.Title === '') {
114
+        this.$message({
115
+          type: 'error',
116
+          message: '标题不能为空'
117
+        })
118
+        return false
119
+      }
120
+      if (this.postData.Consult === '') {
121
+        this.$message({
122
+          type: 'error',
123
+          message: '资讯分类不能为空'
124
+        })
125
+        return false
126
+      }
127
+      if (!this.imgsArr.length) {
128
+        this.$message({
129
+          type: 'error',
130
+          message: '图片不能为空'
131
+        })
132
+        return false
133
+      }
106
       this.postData.OrgId = this.OrgId
134
       this.postData.OrgId = this.OrgId
107
       this.postData.TypeImg = ''
135
       this.postData.TypeImg = ''
108
       for (let i = 0; i < this.imgsArr.length; i++) {
136
       for (let i = 0; i < this.imgsArr.length; i++) {
111
       if (this.postData.TypeImg) {
139
       if (this.postData.TypeImg) {
112
         this.postData.TypeImg = this.postData.TypeImg.substr(0, this.postData.TypeImg.length - 1)
140
         this.postData.TypeImg = this.postData.TypeImg.substr(0, this.postData.TypeImg.length - 1)
113
       }
141
       }
114
-      console.log(this.postData)
142
+      // console.log(this.postData)
115
       this.$ajax(this.$api.cms.addLocation.url, {
143
       this.$ajax(this.$api.cms.addLocation.url, {
116
         method: this.$api.cms.addLocation.method,
144
         method: this.$api.cms.addLocation.method,
117
         data: this.postData
145
         data: this.postData

+ 32
- 16
src/pages/system/courseManager/fiveA/edit.vue 查看文件

3
     <form class="mainForm">
3
     <form class="mainForm">
4
       <ul>
4
       <ul>
5
         <li class="flex-h">
5
         <li class="flex-h">
6
-          <span>名称:</span>
6
+          <span>名称:<em>*</em></span>
7
           <div class="flex-item">
7
           <div class="flex-item">
8
             <div style="width:50%">
8
             <div style="width:50%">
9
               <el-input
9
               <el-input
15
           </div>
15
           </div>
16
         </li>
16
         </li>
17
         <li class="flex-h">
17
         <li class="flex-h">
18
-          <span>标题:</span>
18
+          <span>标题:<em>*</em></span>
19
           <div class="flex-item">
19
           <div class="flex-item">
20
             <div style="width:50%">
20
             <div style="width:50%">
21
               <el-input
21
               <el-input
27
           </div>
27
           </div>
28
         </li>
28
         </li>
29
         <li class="flex-h">
29
         <li class="flex-h">
30
-          <span>资讯分类:</span>
30
+          <span>资讯分类:<em>*</em></span>
31
           <div class="flex-item">
31
           <div class="flex-item">
32
             <div style="width:50%">
32
             <div style="width:50%">
33
               <el-input
33
               <el-input
38
             </div>
38
             </div>
39
           </div>
39
           </div>
40
         </li>
40
         </li>
41
-        <!-- <li class="flex-h">
42
-          <span>编码:</span>
43
-          <div class="flex-item">
44
-            <div style="width:50%">
45
-              <el-input
46
-                placeholder="请输入编码"
47
-                v-model="postData.LocationCode"
48
-                clearable>
49
-              </el-input>
50
-            </div>
51
-          </div>
52
-        </li> -->
53
         <li class="flex-h">
41
         <li class="flex-h">
54
-          <span>图片:</span>
42
+          <span>图片:<em>*</em></span>
55
           <div class="flex-item">
43
           <div class="flex-item">
56
             <el-upload
44
             <el-upload
57
               action='string'
45
               action='string'
116
   methods: {
104
   methods: {
117
     ...mapActions(['updateSystemInfo']),
105
     ...mapActions(['updateSystemInfo']),
118
     submit () {
106
     submit () {
107
+      if (this.postData.LocationName === '') {
108
+        this.$message({
109
+          type: 'error',
110
+          message: '名称不能为空'
111
+        })
112
+        return false
113
+      }
114
+      if (this.postData.Title === '') {
115
+        this.$message({
116
+          type: 'error',
117
+          message: '标题不能为空'
118
+        })
119
+        return false
120
+      }
121
+      if (this.postData.Consult === '') {
122
+        this.$message({
123
+          type: 'error',
124
+          message: '资讯分类不能为空'
125
+        })
126
+        return false
127
+      }
128
+      if (!this.imgsArr.length) {
129
+        this.$message({
130
+          type: 'error',
131
+          message: '图片不能为空'
132
+        })
133
+        return false
134
+      }
119
       this.postData.OrgId = this.OrgId
135
       this.postData.OrgId = this.OrgId
120
       this.postData.TypeImg = ''
136
       this.postData.TypeImg = ''
121
       for (let i = 0; i < this.imgsArr.length; i++) {
137
       for (let i = 0; i < this.imgsArr.length; i++) {

+ 9
- 2
src/pages/system/goodsManager/goodsSpecManager/add.vue 查看文件

3
     <form class="mainForm">
3
     <form class="mainForm">
4
       <ul>
4
       <ul>
5
         <li class="flex-h">
5
         <li class="flex-h">
6
-          <span>规格名:</span>
6
+          <span>规格名:<em>*</em></span>
7
           <div class="flex-item">
7
           <div class="flex-item">
8
             <div style="width:50%">
8
             <div style="width:50%">
9
               <el-input
9
               <el-input
15
           </div>
15
           </div>
16
         </li>
16
         </li>
17
         <li class="flex-h">
17
         <li class="flex-h">
18
-          <span>选择案场:</span>
18
+          <span>选择案场:<em>*</em></span>
19
           <div class="flex-item">
19
           <div class="flex-item">
20
             <div style="width:50%">
20
             <div style="width:50%">
21
               <el-select v-model="CaseId" placeholder="请选择">
21
               <el-select v-model="CaseId" placeholder="请选择">
72
   components: {},
72
   components: {},
73
   methods: {
73
   methods: {
74
     submit () { // 提交数据
74
     submit () { // 提交数据
75
+      if (this.postData.SpecName === '') {
76
+        this.$message({
77
+          message: '规格名不能为空',
78
+          type: 'error'
79
+        })
80
+        return false
81
+      }
75
       this.postData.OrgId = this.OrgId
82
       this.postData.OrgId = this.OrgId
76
       if (this.postData.CaseId === '') this.postData.CaseId = this.CaseId
83
       if (this.postData.CaseId === '') this.postData.CaseId = this.CaseId
77
       this.$ajax(this.$api.goodsManager.addGoodsSpec.url, {
84
       this.$ajax(this.$api.goodsManager.addGoodsSpec.url, {

+ 2
- 2
src/pages/system/goodsManager/goodsSpecManager/edit.vue 查看文件

3
     <form class="mainForm">
3
     <form class="mainForm">
4
       <ul>
4
       <ul>
5
         <li class="flex-h">
5
         <li class="flex-h">
6
-          <span>规格名:</span>
6
+          <span>规格名:<em>*</em></span>
7
           <div class="flex-item">
7
           <div class="flex-item">
8
             <div style="width:50%">
8
             <div style="width:50%">
9
               <el-input
9
               <el-input
15
           </div>
15
           </div>
16
         </li>
16
         </li>
17
         <li class="flex-h">
17
         <li class="flex-h">
18
-          <span>选择案场:</span>
18
+          <span>选择案场:<em>*</em></span>
19
           <div class="flex-item">
19
           <div class="flex-item">
20
             <div style="width:50%">
20
             <div style="width:50%">
21
               <el-select v-model="CaseId" placeholder="请选择">
21
               <el-select v-model="CaseId" placeholder="请选择">

+ 17
- 3
src/pages/system/goodsManager/goodsTypeManager/add.vue 查看文件

3
     <form class="mainForm">
3
     <form class="mainForm">
4
       <ul>
4
       <ul>
5
         <li class="flex-h">
5
         <li class="flex-h">
6
-          <span>商品种类:</span>
6
+          <span>商品种类:<em>*</em></span>
7
           <div class="flex-item">
7
           <div class="flex-item">
8
             <div style="width:50%">
8
             <div style="width:50%">
9
               <el-input
9
               <el-input
16
           </div>
16
           </div>
17
         </li>
17
         </li>
18
         <li class="flex-h">
18
         <li class="flex-h">
19
-          <span>种类英文:</span>
19
+          <span>种类英文:<em>*</em></span>
20
           <div class="flex-item">
20
           <div class="flex-item">
21
             <div style="width:50%">
21
             <div style="width:50%">
22
               <el-input
22
               <el-input
29
           </div>
29
           </div>
30
         </li>
30
         </li>
31
         <li class="flex-h">
31
         <li class="flex-h">
32
-          <span>选择案场:</span>
32
+          <span>选择案场:<em>*</em></span>
33
           <div class="flex-item">
33
           <div class="flex-item">
34
             <div style="width:50%">
34
             <div style="width:50%">
35
               <el-select v-model="CaseId" placeholder="请选择">
35
               <el-select v-model="CaseId" placeholder="请选择">
94
   components: {},
94
   components: {},
95
   methods: {
95
   methods: {
96
     submit () {
96
     submit () {
97
+      if (this.postData.TypeName === '') {
98
+        this.$message({
99
+          type: 'error',
100
+          message: '种类名称不能为空'
101
+        })
102
+        return false
103
+      }
104
+      if (this.postData.EnglishName === '') {
105
+        this.$message({
106
+          type: 'error',
107
+          message: '种类英文不能为空'
108
+        })
109
+        return false
110
+      }
97
       this.postData.OrgId = this.OrgId
111
       this.postData.OrgId = this.OrgId
98
       if (this.postData.CaseId === '') this.postData.CaseId = this.CaseId
112
       if (this.postData.CaseId === '') this.postData.CaseId = this.CaseId
99
       this.$ajax(this.$api.goodsManager.addGoodsType.url, {
113
       this.$ajax(this.$api.goodsManager.addGoodsType.url, {

+ 11
- 4
src/pages/system/goodsManager/goodsTypeManager/edit.vue 查看文件

3
     <form class="mainForm">
3
     <form class="mainForm">
4
       <ul>
4
       <ul>
5
         <li class="flex-h">
5
         <li class="flex-h">
6
-          <span>商品种类:</span>
6
+          <span>商品种类:<em>*</em></span>
7
           <div class="flex-item">
7
           <div class="flex-item">
8
             <div style="width:50%">
8
             <div style="width:50%">
9
               <el-input
9
               <el-input
16
           </div>
16
           </div>
17
         </li>
17
         </li>
18
         <li class="flex-h">
18
         <li class="flex-h">
19
-          <span>种类英文:</span>
19
+          <span>种类英文:<em>*</em></span>
20
           <div class="flex-item">
20
           <div class="flex-item">
21
             <div style="width:50%">
21
             <div style="width:50%">
22
               <el-input
22
               <el-input
29
           </div>
29
           </div>
30
         </li>
30
         </li>
31
         <li class="flex-h">
31
         <li class="flex-h">
32
-          <span>选择案场:</span>
32
+          <span>选择案场:<em>*</em></span>
33
           <div class="flex-item">
33
           <div class="flex-item">
34
             <div style="width:50%">
34
             <div style="width:50%">
35
               <el-select v-model="CaseId" placeholder="请选择">
35
               <el-select v-model="CaseId" placeholder="请选择">
93
         method: this.$api.goodsManager.getGoodsTypeById.method,
93
         method: this.$api.goodsManager.getGoodsTypeById.method,
94
         urlData: {id: this.$route.query.id}
94
         urlData: {id: this.$route.query.id}
95
       }).then(res => {
95
       }).then(res => {
96
-        console.log(res)
96
+        // console.log(res)
97
         this.postData = res
97
         this.postData = res
98
       })
98
       })
99
     },
99
     },
105
         })
105
         })
106
         return false
106
         return false
107
       }
107
       }
108
+      if (this.postData.EnglishName === '') {
109
+        this.$message({
110
+          type: 'error',
111
+          message: '种类英文不能为空'
112
+        })
113
+        return false
114
+      }
108
       this.$ajax(this.$api.goodsManager.editGoodsType.url, {
115
       this.$ajax(this.$api.goodsManager.editGoodsType.url, {
109
         method: this.$api.goodsManager.editGoodsType.method,
116
         method: this.$api.goodsManager.editGoodsType.method,
110
         data: this.postData,
117
         data: this.postData,

+ 2
- 2
src/pages/system/newOrder/newOrderList/index.vue 查看文件

30
           <div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
30
           <div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
31
             <i class="iconfont icon-yinchenglogo" style="font-size:70px;color:red;position: relative;bottom: 20px;margin-right:10px;"></i>
31
             <i class="iconfont icon-yinchenglogo" style="font-size:70px;color:red;position: relative;bottom: 20px;margin-right:10px;"></i>
32
             <div style="display:inline-block;">
32
             <div style="display:inline-block;">
33
-              <span style="display:block;font-size:20px;font-weight:700;">{{item.AreaName + item.TableNo}}</span>
33
+              <span style="display:block;font-size:20px;font-weight:700;width:180px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{item.AreaName + item.TableNo}}</span>
34
               <span style="display:block;margin-top:10px">下单时间:{{toolClass.dateFormat(item.CreateDate)}}</span>
34
               <span style="display:block;margin-top:10px">下单时间:{{toolClass.dateFormat(item.CreateDate)}}</span>
35
               <span style="display:block;margin-top:10px">已等待:<span style="color:red;font-weight:700;">{{leftTimes[item.OrdersId]}}</span></span>
35
               <span style="display:block;margin-top:10px">已等待:<span style="color:red;font-weight:700;">{{leftTimes[item.OrdersId]}}</span></span>
36
             </div>
36
             </div>
231
       console.log(this.user)
231
       console.log(this.user)
232
       let caseid = this.caseid
232
       let caseid = this.caseid
233
       let id = this.userInfo.UserId
233
       let id = this.userInfo.UserId
234
-      const wsuri = `${window.location.origin.replace('http', 'ws')}/api/common/MQ/websocket/${caseid}/${id}`
234
+      const wsuri = `${window.location.origin.replace('http', 'ws')}/api-v2/common/MQ/websocket/${caseid}/${id}`
235
       // const wsuri = `ws://192.168.0.11/api/guest/MQ/websocket/${caseid}/${id}`
235
       // const wsuri = `ws://192.168.0.11/api/guest/MQ/websocket/${caseid}/${id}`
236
       try {
236
       try {
237
         this.websock = new WebSocket(wsuri)
237
         this.websock = new WebSocket(wsuri)

+ 10
- 0
src/store/case/device.js 查看文件

16
     },
16
     },
17
   },
17
   },
18
   actions: {
18
   actions: {
19
+    bindKeyByPhone ({ commit }, payload) {
20
+      return new Promise((resolve, reject) => {
21
+        ajax(api.caseManager.bindKeyByPhone.url, {
22
+          method: api.caseManager.bindKeyByPhone.method,
23
+          urlData: { ...payload },
24
+        }).then(res => {
25
+          resolve(res)
26
+        }).catch(reject)
27
+      })
28
+    },
19
     bindKeyer ({ commit }, payload) {
29
     bindKeyer ({ commit }, payload) {
20
       return new Promise((resolve, reject) => {
30
       return new Promise((resolve, reject) => {
21
         ajax(api.caseManager.bindKey.url, {
31
         ajax(api.caseManager.bindKey.url, {

+ 4
- 0
src/util/api.js 查看文件

89
       method: 'get',
89
       method: 'get',
90
       url: `${baseUrl}${common}/case/key`
90
       url: `${baseUrl}${common}/case/key`
91
     },
91
     },
92
+    bindKeyByPhone: {
93
+      method: 'post',
94
+      url: `${baseUrl}${common}/case/key/:phone/:keyid`
95
+    },
92
     bindKey: {
96
     bindKey: {
93
       method: 'post',
97
       method: 'post',
94
       url: `${baseUrl}${common}/case/key/:keyid/:customerid/:customername`
98
       url: `${baseUrl}${common}/case/key/:keyid/:customerid/:customername`