liuhj 1 year ago
parent
commit
aa97c94904

+ 149 - 5
package-lock.json

@@ -15,6 +15,7 @@
         "@fullcalendar/interaction": "^6.1.4",
         "@fullcalendar/timegrid": "^6.1.4",
         "@fullcalendar/vue": "^6.1.4",
+        "@microsoft/signalr": "^8.0.0",
         "axios": "^1.3.4",
         "element-ui": "^2.15.13",
         "pinyin-pro": "^3.17.0",
@@ -592,6 +593,46 @@
         "vue": "^2.6.12"
       }
     },
+    "node_modules/@microsoft/signalr": {
+      "version": "8.0.0",
+      "resolved": "https://registry.npmjs.org/@microsoft/signalr/-/signalr-8.0.0.tgz",
+      "integrity": "sha512-K/wS/VmzRWePCGqGh8MU8OWbS1Zvu7DG7LSJS62fBB8rJUXwwj4axQtqrAAwKGUZHQF6CuteuQR9xMsVpM2JNA==",
+      "dependencies": {
+        "abort-controller": "^3.0.0",
+        "eventsource": "^2.0.2",
+        "fetch-cookie": "^2.0.3",
+        "node-fetch": "^2.6.7",
+        "ws": "^7.4.5"
+      }
+    },
+    "node_modules/@microsoft/signalr/node_modules/eventsource": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-2.0.2.tgz",
+      "integrity": "sha512-IzUmBGPR3+oUG9dUeXynyNmf91/3zUSJg1lCktzKw47OXuhco54U3r9B7O4XX+Rb1Itm9OZ2b0RkTs10bICOxA==",
+      "engines": {
+        "node": ">=12.0.0"
+      }
+    },
+    "node_modules/@microsoft/signalr/node_modules/ws": {
+      "version": "7.5.9",
+      "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz",
+      "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==",
+      "engines": {
+        "node": ">=8.3.0"
+      },
+      "peerDependencies": {
+        "bufferutil": "^4.0.1",
+        "utf-8-validate": "^5.0.2"
+      },
+      "peerDependenciesMeta": {
+        "bufferutil": {
+          "optional": true
+        },
+        "utf-8-validate": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/@popperjs/core": {
       "version": "2.11.6",
       "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
@@ -648,6 +689,17 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/abort-controller": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
+      "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
+      "dependencies": {
+        "event-target-shim": "^5.0.0"
+      },
+      "engines": {
+        "node": ">=6.5"
+      }
+    },
     "node_modules/accepts": {
       "version": "1.3.8",
       "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
@@ -5102,6 +5154,14 @@
         "es5-ext": "~0.10.14"
       }
     },
+    "node_modules/event-target-shim": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
+      "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
+      "engines": {
+        "node": ">=6"
+      }
+    },
     "node_modules/eventemitter3": {
       "version": "4.0.7",
       "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
@@ -5480,6 +5540,15 @@
         "node": ">=0.4.0"
       }
     },
+    "node_modules/fetch-cookie": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-2.1.0.tgz",
+      "integrity": "sha512-39+cZRbWfbibmj22R2Jy6dmTbAWC+oqun1f1FzQaNurkPDUP4C38jpeZbiXCR88RKRVDp8UcDrbFXkNhN+NjYg==",
+      "dependencies": {
+        "set-cookie-parser": "^2.4.8",
+        "tough-cookie": "^4.0.0"
+      }
+    },
     "node_modules/file-loader": {
       "version": "1.1.11",
       "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz",
@@ -8133,6 +8202,25 @@
         "lower-case": "^1.1.1"
       }
     },
+    "node_modules/node-fetch": {
+      "version": "2.7.0",
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
+      "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+      "dependencies": {
+        "whatwg-url": "^5.0.0"
+      },
+      "engines": {
+        "node": "4.x || >=6.0.0"
+      },
+      "peerDependencies": {
+        "encoding": "^0.1.0"
+      },
+      "peerDependenciesMeta": {
+        "encoding": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/node-forge": {
       "version": "0.10.0",
       "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz",
@@ -11764,6 +11852,11 @@
       "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==",
       "dev": true
     },
+    "node_modules/psl": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
+      "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag=="
+    },
     "node_modules/public-encrypt": {
       "version": "4.0.3",
       "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
@@ -11871,8 +11964,7 @@
     "node_modules/querystringify": {
       "version": "2.2.0",
       "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
-      "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",
-      "dev": true
+      "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ=="
     },
     "node_modules/quill": {
       "version": "1.3.7",
@@ -12302,8 +12394,7 @@
     "node_modules/requires-port": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
-      "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
-      "dev": true
+      "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
     },
     "node_modules/resize-observer-polyfill": {
       "version": "1.5.1",
@@ -12629,6 +12720,11 @@
       "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
       "dev": true
     },
+    "node_modules/set-cookie-parser": {
+      "version": "2.6.0",
+      "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz",
+      "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ=="
+    },
     "node_modules/set-value": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
@@ -13840,6 +13936,33 @@
       "integrity": "sha512-FclLrw8b9bMWf4QlCJuHBEVhSRsqDj6u3nIjAzPeJvgl//1hBlffdlk0MALceL14+koWEdU4ofRAXofbODxQzg==",
       "dev": true
     },
+    "node_modules/tough-cookie": {
+      "version": "4.1.3",
+      "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz",
+      "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==",
+      "dependencies": {
+        "psl": "^1.1.33",
+        "punycode": "^2.1.1",
+        "universalify": "^0.2.0",
+        "url-parse": "^1.5.3"
+      },
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/tough-cookie/node_modules/punycode": {
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+      "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/tr46": {
+      "version": "0.0.3",
+      "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+      "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
+    },
     "node_modules/trim-newlines": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
@@ -14141,6 +14264,14 @@
         "imurmurhash": "^0.1.4"
       }
     },
+    "node_modules/universalify": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
+      "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==",
+      "engines": {
+        "node": ">= 4.0.0"
+      }
+    },
     "node_modules/unpipe": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
@@ -14281,7 +14412,6 @@
       "version": "1.5.10",
       "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
       "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
-      "dev": true,
       "dependencies": {
         "querystringify": "^2.1.1",
         "requires-port": "^1.0.0"
@@ -14828,6 +14958,11 @@
         "minimalistic-assert": "^1.0.0"
       }
     },
+    "node_modules/webidl-conversions": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+      "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
+    },
     "node_modules/webpack": {
       "version": "3.12.0",
       "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.12.0.tgz",
@@ -15450,6 +15585,15 @@
         "node": ">=0.8.0"
       }
     },
+    "node_modules/whatwg-url": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+      "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+      "dependencies": {
+        "tr46": "~0.0.3",
+        "webidl-conversions": "^3.0.0"
+      }
+    },
     "node_modules/whet.extend": {
       "version": "0.9.9",
       "resolved": "https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz",

+ 1 - 0
package.json

@@ -17,6 +17,7 @@
     "@fullcalendar/interaction": "^6.1.4",
     "@fullcalendar/timegrid": "^6.1.4",
     "@fullcalendar/vue": "^6.1.4",
+    "@microsoft/signalr": "^8.0.0",
     "axios": "^1.3.4",
     "element-ui": "^2.15.13",
     "pinyin-pro": "^3.17.0",

+ 2 - 2
src/components/OP/OpAirTicketRes.vue

@@ -493,7 +493,7 @@ export default {
                 id: 0,
                 payDId: 72,
                 consumptionPatterns: '',
-                consumptionDate: this.dateFormat(new Date()),
+                consumptionDate: this.transformDateFormat(new Date()),
                 ctdId: '',
                 bankNo: '',
                 cardholderName: 'Zhang Hailin',
@@ -504,7 +504,7 @@ export default {
                 otherSideNo: '',
                 otherSideName: '',
                 mfOperator: 0,
-                mfOperatorDate: this.dateFormat(new Date()),
+                mfOperatorDate: this.transformDateFormat(new Date()),
                 diId: this.DiId,
                 payThenMoney: 0,
                 payee: '',

+ 3 - 3
src/components/OP/OpCarTouristGuideGroundId.vue

@@ -213,7 +213,7 @@ export default {
             IsAuditGM: 0,
             VisitDate: '',
             opRoyaltyLvList: [],
-            dateFormat: function (value) {
+            transformDateFormat: function (value) {
 
                 // 将value转换为Date对象
                 var date = new Date(value);
@@ -283,7 +283,7 @@ export default {
                                 debugger
                                 if (that.delegationInfoList[index].id == that.OpCarTouristGuideGroundData.diId) {
                                     that.delegationInfo = that.delegationInfoList[index];
-                                    that.VisitDate = that.dateFormat(that.delegationInfo.visitStartDate) + '至' + that.dateFormat(that.delegationInfo.visitEndDate);
+                                    that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
                                     debugger
                                     that.delegationInfo.opRoyaltyLv = that.delegationInfo.opRoyaltyLv
                                     break;
@@ -303,7 +303,7 @@ export default {
                 if (that.delegationInfoList[index].id == that.OpCarTouristGuideGroundData.diId) {
                     that.delegationInfo = that.delegationInfoList[index];
 
-                    that.VisitDate = that.dateFormat(that.delegationInfo.visitStartDate) + '至' + that.dateFormat(that.delegationInfo.visitEndDate);
+                    that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
                     break;
                 }
             }

+ 3 - 3
src/components/OP/OpCustomers.vue

@@ -322,7 +322,7 @@ export default {
             IsAuditGM: 0,
             VisitDate: '',
             passengerTypeSelect: [],
-            dateFormat: function (value) {
+            transformDateFormat: function (value) {
 
                 // 将value转换为Date对象
                 var date = new Date(value);
@@ -403,7 +403,7 @@ export default {
                         if (that.delegationInfoList[index].id == that.OpCustomersData.diId) {
                             that.delegationInfo = that.delegationInfoList[index];
                             that.OpCustomersData.diId = that.delegationInfo.id
-                            that.VisitDate = that.dateFormat(that.delegationInfo.visitStartDate) + '至' + that.dateFormat(that.delegationInfo.visitEndDate);
+                            that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
                             var url = "/api/Groups/CustomersInitialize"
                             that.$axios({
                                 method: 'post',
@@ -443,7 +443,7 @@ export default {
                 if (that.delegationInfoList[index].id == that.OpCustomersData.diId) {
                     that.delegationInfo = that.delegationInfoList[index];
 
-                    that.VisitDate = that.dateFormat(that.delegationInfo.visitStartDate) + '至' + that.dateFormat(that.delegationInfo.visitEndDate);
+                    that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
                     var url = "/api/Groups/CustomersInitialize"
                     that.$axios({
                         method: 'post',

+ 1 - 1
src/components/OP/OpInvitationOfficialActivities.vue

@@ -221,7 +221,7 @@ export default {
                 diId: '',
                 inviterArea: '',
                 inviter: '',
-                inviteTime: this.dateFormat(new Date()),
+                inviteTime: this.transformDateFormat(new Date()),
                 attachment: '',
                 inviteCosts: 0,
                 currency: 48,

+ 3 - 3
src/components/OP/OpVisaPriec.vue

@@ -315,7 +315,7 @@ export default {
             IsAuditGM: 0,
             VisitDate: '',
             passengerTypeSelect: [],
-            dateFormat: function (value) {
+            transformDateFormat: function (value) {
 
                 // 将value转换为Date对象
                 var date = new Date(value);
@@ -407,7 +407,7 @@ export default {
                         if (that.delegationInfoList[index].id == that.OpVisaPriceData.diId) {
                             that.delegationInfo = that.delegationInfoList[index];
 
-                            that.VisitDate = that.dateFormat(that.delegationInfo.visitStartDate) + '至' + that.dateFormat(that.delegationInfo.visitEndDate);
+                            that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
                             break;
                         }
                     }
@@ -437,7 +437,7 @@ export default {
                 if (that.delegationInfoList[index].id == that.OpVisaPriceData.diId) {
                     that.delegationInfo = that.delegationInfoList[index];
 
-                    that.VisitDate = that.dateFormat(that.delegationInfo.visitStartDate) + '至' + that.dateFormat(that.delegationInfo.visitEndDate);
+                    that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
                     break;
                 }
             }

+ 31 - 31
src/components/OP/visaEdit.vue

@@ -839,7 +839,7 @@ export default {
                 phone: '',
                 birthProvince: '',
                 birthCity: '',
-                birthDay: this.dateFormat(new Date()),
+                birthDay: this.transformDateFormat(new Date()),
                 airType: '',
                 seatPref: 0,
                 airRemark: '',
@@ -853,7 +853,7 @@ export default {
                 crmCompanyId: '',
                 job: '',
                 workState: '',
-                workDate: this.dateFormat(new Date()),
+                workDate: this.transformDateFormat(new Date()),
                 wage: '',
                 clientPhone: '',
                 clientFax: '',
@@ -861,28 +861,28 @@ export default {
                 clientLeader: '',
                 clientLeaderJob: '',
                 isGetSchengen: 0,
-                startTime: this.dateFormat(new Date()),
-                endTime: this.dateFormat(new Date()),
+                startTime: this.transformDateFormat(new Date()),
+                endTime: this.transformDateFormat(new Date()),
                 isFinger: 0,
-                fingerDate: this.dateFormat(new Date()),
+                fingerDate: this.transformDateFormat(new Date()),
                 isVisitUC: 0,
-                usaDate: this.dateFormat(new Date()),
+                usaDate: this.transformDateFormat(new Date()),
                 usaDays: 0,
-                canDate: this.dateFormat(new Date()),
+                canDate: this.transformDateFormat(new Date()),
                 canDays: 0,
                 isUSAVia: 0,
-                getUSAVisaDate: this.dateFormat(new Date()),
+                getUSAVisaDate: this.transformDateFormat(new Date()),
                 getUPPlace: '',
                 usaVisaCate: '',
                 usaVisaCode: '',
                 usaFinger: 0,
                 isRejected: 0,
-                rejectedDate: this.dateFormat(new Date()),
+                rejectedDate: this.transformDateFormat(new Date()),
                 rejectedPlace: '',
                 rejectedVisa: '',
                 isRevoke: 0,
                 isLose: 0,
-                loseDate: this.dateFormat(new Date()),
+                loseDate: this.transformDateFormat(new Date()),
                 loseCode: '',
                 isUSAVisa: 0,
                 mateUSA: 0,
@@ -901,13 +901,13 @@ export default {
                 costBearers: '',
                 tableOpName: '',
                 tableOpTel: '',
-                tableDate: this.dateFormat(new Date()),
+                tableDate: this.transformDateFormat(new Date()),
                 party: '',
                 nationality: '',
-                weddingDate: this.dateFormat(new Date()),
-                divorceDate: this.dateFormat(new Date()),
+                weddingDate: this.transformDateFormat(new Date()),
+                divorceDate: this.transformDateFormat(new Date()),
                 mateName: '',
-                mateBirthDay: this.dateFormat(new Date()),
+                mateBirthDay: this.transformDateFormat(new Date()),
                 mateBirthCity: '',
                 mateBirthCountry: '',
                 mateAddress: '',
@@ -932,8 +932,8 @@ export default {
                         country: '',
                         area: '',
                         targetCountry: '',
-                        issueDt: this.dateFormat(new Date()),
-                        expiryDt: this.dateFormat(new Date()),
+                        issueDt: this.transformDateFormat(new Date()),
+                        expiryDt: this.transformDateFormat(new Date()),
                         idCardAddress: '',
                         createUserId: this.userId,
                         remark: '',
@@ -944,7 +944,7 @@ export default {
             {
                 address: "",
                 companyName: "",
-                createTime: this.dateFormat(new Date()),
+                createTime: this.transformDateFormat(new Date()),
                 id: '',
                 postCodes: "",
                 remark: "",
@@ -960,8 +960,8 @@ export default {
                     phone: "",
                     job: "",
                     leaderName: "",
-                    workStart: this.dateFormat(new Date()),
-                    workEnd: this.dateFormat(new Date()),
+                    workStart: this.transformDateFormat(new Date()),
+                    workEnd: this.transformDateFormat(new Date()),
                     workState: "",
                     createUserId: this.userId,
                     remark: ""
@@ -977,8 +977,8 @@ export default {
                     teacher: '',
                     education: '',
                     subject: '',
-                    studyStart: this.dateFormat(new Date()),
-                    studyEnd: this.dateFormat(new Date()),
+                    studyStart: this.transformDateFormat(new Date()),
+                    studyEnd: this.transformDateFormat(new Date()),
                     createUserId: this.userId,
                     remark: ''
                 }
@@ -990,14 +990,14 @@ export default {
                     dcId: 0,
                     appellation: "",
                     name: "",
-                    birthDay: this.dateFormat(new Date()),
+                    birthDay: this.transformDateFormat(new Date()),
                     birthPlace: "",
                     politics: "",
                     client: "",
                     address: "",
                     isEu: 0,
                     nameSnd: "",
-                    birthDaySnd: this.dateFormat(new Date()),
+                    birthDaySnd: this.transformDateFormat(new Date()),
                     nationality: "",
                     idCard: "",
                     reletionship: "",
@@ -1271,14 +1271,14 @@ export default {
                 dcId: this.Id,
                 appellation: "",
                 name: "",
-                birthDay: this.dateFormat(new Date()),
+                birthDay: this.transformDateFormat(new Date()),
                 birthPlace: "",
                 politics: "",
                 client: "",
                 address: "",
                 isEu: 0,
                 nameSnd: "",
-                birthDaySnd: this.dateFormat(new Date()),
+                birthDaySnd: this.transformDateFormat(new Date()),
                 nationality: "",
                 idCard: "",
                 reletionship: "",
@@ -1328,8 +1328,8 @@ export default {
                 country: '',
                 area: '',
                 targetCountry: '',
-                issueDt: this.dateFormat(new Date()),
-                expiryDt: this.dateFormat(new Date()),
+                issueDt: this.transformDateFormat(new Date()),
+                expiryDt: this.transformDateFormat(new Date()),
                 idCardAddress: '',
                 createUserId: 0,
                 remark: '',
@@ -1379,8 +1379,8 @@ export default {
                 phone: "",
                 job: "",
                 leaderName: "",
-                workStart: this.dateFormat(new Date()),
-                workEnd: this.dateFormat(new Date()),
+                workStart: this.transformDateFormat(new Date()),
+                workEnd: this.transformDateFormat(new Date()),
                 workState: "",
                 createUserId: 0,
                 remark: ""
@@ -1431,8 +1431,8 @@ export default {
                     teacher: '',
                     education: '',
                     subject: '',
-                    studyStart: this.dateFormat(new Date()),
-                    studyEnd: this.dateFormat(new Date()),
+                    studyStart: this.transformDateFormat(new Date()),
+                    studyEnd: this.transformDateFormat(new Date()),
                     createUserId: this.userId,
                     remark: ''
                 }

+ 32 - 1
src/components/home.vue

@@ -187,6 +187,8 @@
   </div>
 </template>
 <script>
+// import * as signalR from "@microsoft/signalr";
+// import * as signalR from "../../node_modules/microso";
 // import child from '~/components/Finance/FeesPage';
 export default {
   data() {
@@ -305,7 +307,35 @@ export default {
     },
     fatherMethod() {
       console.log('测试');
-    }
+    },
+
+
+    //实时通讯
+    // async startConnection() {
+    //   this.connection = new signalR.HubConnectionBuilder()
+    //     .withUrl('/api/chatHub') // 替换为你的SignalR服务端URL
+    //     .build();
+ 
+    //   this.connection.on('ReceiveMessage', (message) => {
+    //     console.log('Received message:', message);
+    //   });
+ 
+    //   try {
+    //     await this.connection.start();
+    //     console.log('SignalR Connected.');
+    //   } catch (err) {
+    //     console.log('Error while starting SignalR connection:', err);
+    //   }
+    // },
+    // async sendMessage() {
+    //   if (this.connection) {
+    //     try {
+    //       await this.connection.invoke('SendMessage', 'Hello World'); // SendMessage是服务端定义的方法
+    //     } catch (err) {
+    //       console.error(err);
+    //     }
+    //   }
+    // },
   },
   mounted() {
     this.removal();
@@ -315,6 +345,7 @@ export default {
   },
   created() {
     this.userinif = JSON.parse(localStorage.getItem('userinif'));
+    // this.startConnection();
   },
   computed: {
     filmenuList: function () {

+ 1 - 0
src/components/statistics/Reportstbale.vue

@@ -1143,6 +1143,7 @@ export default {
     justify-content: space-between;
     margin-top: 10px;
     margin-bottom: 2px;
+    
 }
 .reportsbale-info-li{
     margin-right: 30px;

+ 531 - 0
src/components/system/AssignTasks.vue

@@ -0,0 +1,531 @@
+<template>
+    <div>
+        <div class="AssignTasks-all">
+            <div class="AssignTasks-title">新建任务</div>
+            <div class="AssignTasks-form">
+                <el-form :model="taskform" :rules="rulestaskform" ref="taskform" label-width="80px" class="demo-ruleForm">
+                    <div class="AssignTasks-form-first">
+                        <el-form-item label="所属部门" prop="department">
+                            <el-select :disabled="true" size="medium" filterable  v-model="taskform.department" placeholder="请选择">
+                                <el-option
+                                    v-for="item in departmentNameInfos"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="任务名称" prop="taskname">
+                            <el-input size="medium" v-model="taskform.taskname" placeholder="请输入内容"></el-input>
+                        </el-form-item>
+                        <el-form-item label="优先级" prop="value">
+                            <el-select 
+                            size="medium" 
+                            filterable  
+                            v-model="taskform.value" 
+                            placeholder="请选择">
+                                <el-option
+                                    v-for="item in options"
+                                    :key="item.value"
+                                    :label="item.label"
+                                    :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="所属团组" prop="Thegroup">
+                            <el-select size="medium" filterable  v-model="taskform.Thegroup" placeholder="请选择">
+                                <el-option
+                                    v-for="item in groupNameInfos"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <!-- <el-form-item label="预计" prop="name">
+                            <el-input size="medium" v-model="value" placeholder="请输入内容"></el-input>
+                        </el-form-item> -->
+                    </div>
+                    <el-form-item label="指派给" prop="staff">
+                        <el-select
+                        size="medium"
+                        style="width: 100%;"
+                        v-model="taskform.staff"
+                        multiple
+                        filterable
+                        allow-create
+                        default-first-option
+                        @change="selectchg"
+                        placeholder="请选择人员">
+                            <el-option
+                            v-for="item in executeTaskUserInfos"
+                            :key="item.id"
+                            :label="item.name"
+                            :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <div class="quill-box">
+                        <label class="quill-title">任务描述</label>
+                        <quill-editor class="editor"
+                            ref="myTextEditor"
+                            v-model="content"
+                            :options="editorOption"
+                            @blur="onEditorBlur($event)"
+                            @focus="onEditorFocus($event)"
+                            @ready="onEditorReady($event)"
+                            @change="onEditorChange($event)">
+                            <button id="custom-button">defineAsyncComponent</button>
+                        </quill-editor>
+                    </div>
+                    <div style="display: flex;">
+                        <el-form-item label="日程规则" prop="schedulerules">
+                            <el-date-picker
+                            @change="riqi"
+                            v-model="taskform.schedulerules"
+                            type="datetimerange"
+                            range-separator="至"
+                            start-placeholder="开始日期"
+                            end-placeholder="结束日期">
+                            </el-date-picker>
+                                                    <!-- <el-date-picker
+                            @change="riqi"
+                            v-model="taskform.schedulerules"
+                            type="daterange"
+                            range-separator="至"
+                            start-placeholder="开始日期"
+                            end-placeholder="结束日期">
+                            </el-date-picker> -->
+                        </el-form-item>
+                        <el-form-item>
+                            <el-switch
+                            v-model="taskform.kpi"
+                            active-text="纳入绩效考核"
+                            inactive-text="不纳入绩效考核">
+                            </el-switch>
+                        </el-form-item>
+                    </div>
+                </el-form>
+                <div class="AssignTasks-btn">
+                    <el-button size="medium" @click="submitForm('taskform')" type="primary">确定</el-button>
+                    <el-button size="medium" @click="goback">取消</el-button>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data () {
+        return {
+            id:'',
+            token:'',
+            pageId:'',
+            userId:'',
+            departmentNameInfos:[],
+            executeTaskUserInfos:[],
+            groupNameInfos:[],
+            taskform:{
+                department:'',
+                Thegroup:'',
+                value:2,
+                taskname:'',
+                schedulerules:[],
+                staff:[],
+                kpi:false
+            },
+            rulestaskform:{
+                department: [
+                    { required: true, message: '请选择所属部门', trigger: ['change','blur'] }
+                ],
+                taskname: [
+                    { required: true, message: '请填写任务名称', trigger: ['change','blur'] }
+                ],
+                value: [
+                    { required: true, message: '请选择优先级', trigger: ['change','blur'] }
+                ],
+                Thegroup: [
+                    { required: true, message: '请选择所属团组', trigger: ['change','blur']}
+                ],
+                staff: [
+                    { required: true, message: '请选择人员', trigger: ['change','blur'] }
+                ],
+                schedulerules: [
+                    { required: true, message: '请选择日程规则', trigger: ['change','blur'] }
+                ],
+            },
+            options: [
+                {
+                value: 1,
+                label: '1级'
+                }, 
+                {
+                value: 2,
+                label: '2级'
+                }, 
+                {
+                value: 3,
+                label: '3级'
+                }, 
+                {
+                value: 4,
+                label: '4级'
+                }
+            ],
+            //富文本
+            content: '',
+            contents:'',
+            editorOption: {
+                modules: {
+                toolbar: [
+                    ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
+                    ["blockquote", "code-block"], // 引用  代码块
+                    [{ header: 1 }, { header: 2 }], // 1、2 级标题
+                    [{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
+                    [{ script: "sub" }, { script: "super" }], // 上标/下标
+                    [{ indent: "-1" }, { indent: "+1" }], // 缩进
+                    // [{'direction': 'rtl'}],                         // 文本方向
+                    [{ size: ["small", false, "large", "huge"] }], // 字体大小
+                    [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
+                    [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
+                    [{ font: [] }], // 字体种类
+                    [{ align: [] }], // 对齐方式
+                    ["clean"], // 清除文本格式
+                    ["link", "image", "video"], // 链接、图片、视频
+                    ["sourceEditor"]
+                ], //工具菜单栏配置
+                },
+                placeholder: '请在这里添加产品描述', //提示
+                readyOnly: false, //是否只读
+                theme: 'snow', //主题 snow/bubble
+                syntax: true, //语法检测
+            }
+        }
+    },
+    methods: {
+        // 失去焦点
+        onEditorBlur(editor) {
+            this.content=this.contents
+        },
+        // 获得焦点
+        onEditorFocus(editor) {},
+        // 开始
+        onEditorReady(editor) {},
+        // 值发生变化
+        onEditorChange(editor) {
+            console.log(editor);
+            this.contents = editor.text;
+        },
+        riqi(){
+           console.log(this.transferdate(this.taskform.schedulerules[0]));
+        },
+        selectchg(){
+            
+        },
+        //获取详情
+        PostTaskAllocationDetails(){
+            console.log(this.id)
+            if(this.id==undefined){
+                return
+            }
+            var url = "/api/PersonnelModule/PostTaskAllocationDetails"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.userId
+                },
+                data:{
+                    portType:1,
+                    userId: 5,
+                    pageId: that.pageId,
+                    id: that.id,
+                }
+            }).then(function (res) {
+                console.log(res)
+                if(res.data.code==200){
+                    that.taskform.department=res.data.data.depId;
+                    that.taskform.taskname=res.data.data.taskName;
+                    that.taskform.value=res.data.data.taskPriority;
+                    that.taskform.Thegroup=res.data.data.diId;
+                    for(var i=0;i<res.data.data.userTaskInfos.length;i++){
+                        that.taskform.staff.push(res.data.data.userTaskInfos[i].userId);
+                    }
+                    that.content=res.data.data.taskContent;
+                    that.taskform.schedulerules=[res.data.data.predictBeginTime,res.data.data.predictEndTime];
+                    that.taskform.kpi=res.data.data.isIntoPerformance==1?true:false;
+                    
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+            }).catch(function (error) {
+                that.$message.error("获取详情");
+            });
+        },
+        //基础数据原
+        PostTaskAllocationInit(){
+            var url = "/api/PersonnelModule/PostTaskAllocationInit"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.userId
+                },
+                data:{
+                    portType:1,
+                    userId: 5
+                }
+            }).then(function (res) {
+                console.log(res)
+                if(res.data.code==200){
+                    that.departmentNameInfos.push(res.data.data.departmentNameInfo);
+                    that.executeTaskUserInfos=res.data.data.executeTaskUserInfos;
+                    that.groupNameInfos=res.data.data.groupNameInfos;
+                    that.taskform.Thegroup=that.groupNameInfos[0].id;
+                    that.taskform.department=that.departmentNameInfos[0].id;
+                    that.PostTaskAllocationDetails()
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+            }).catch(function (error) {
+                that.$message.error("获取数据源失败!");
+            });
+        },
+        //确定
+        submitForm(formName) {
+            this.$refs[formName].validate((valid) => {
+                if (valid) {
+                    this.PostTaskAllocationAddOrEdit()
+                } else {
+                    console.log('error submit!!');
+                    return false;
+                }
+            });
+        },
+        //返回上一页
+        goback(){
+            this.$router.go(-1);
+        },
+        //转换日期
+        transferdate(val){
+            var today = new Date(val);
+
+            var DD = String(today.getDate()).padStart(2, '0'); // 获取日
+            var MM = String(today.getMonth() + 1).padStart(2, '0'); //获取月份,1 月为 0
+            var yyyy = today.getFullYear(); // 获取年
+            var Hours=today.getHours()<10 ? '0'+today.getHours() : new Date().getHours();;
+            var Minutes=today.getMinutes()<10 ? '0'+today.getMinutes() : new Date().getMinutes();
+            var Seconds=today.getSeconds()<10 ? '0'+today.getSeconds() : new Date().getSeconds();
+
+            return yyyy+'-'+MM+'-'+DD+' '+Hours+':'+Minutes+':'+Seconds
+        },
+        //新增api
+        PostTaskAllocationAddOrEdit(){
+            var id=this.id;
+            console.log(id)
+            if(id==undefined){
+                id=0
+            }else{
+                id=this.id;
+            }
+            var url = "/api/PersonnelModule/PostTaskAllocationAddOrEdit"
+            var that = this
+            var data={
+                    portType:1,
+                    userId: 5,
+                    pageId: that.pageId,
+                    id: id,
+                    depId: that.taskform.department,
+                    diId: that.taskform.Thegroup,
+                    taskPriority:that.taskform.value,
+                    taskName:that.taskform.taskname,
+                    taskContent: that.contents,
+                    userIds: that.taskform.staff,
+                    predictBeginTime: that.transferdate(that.taskform.schedulerules[0]),
+                    predictEndTime: that.transferdate(that.taskform.schedulerules[1]),
+                    isIntoPerformance: that.taskform.staff?1:0,
+                }
+                console.log(JSON.stringify(data))
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.userId
+                },
+                data:{
+                    portType:1,
+                    userId: 5,
+                    pageId: that.pageId,
+                    id: 0,
+                    depId: that.taskform.department,
+                    diId: that.taskform.Thegroup,
+                    taskPriority:that.taskform.value,
+                    taskName:that.taskform.taskname,
+                    taskContent: that.contents,
+                    userIds: that.taskform.staff,
+                    predictBeginTime: that.transferdate(that.taskform.schedulerules[0]),
+                    predictEndTime: that.transferdate(that.taskform.schedulerules[1]),
+                    isIntoPerformance: that.taskform.staff?1:0,
+                }
+            }).then(function (res) {
+                console.log(res)
+                if(res.data.code==200){
+                    that.$message({
+                        type: 'success',
+                        message: res.data.msg,
+                        duration:'3000'
+                    });
+                    that.goback();
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+            }).catch(function (error) {
+                that.$message.error("获取数据源失败!");
+            });
+        },
+    },
+    computed: {
+        editor() {
+            return this.$refs.myTextEditor.quillEditor;
+        }
+    },
+    mounted(){
+        this.id = Number(this.$route.query.id);
+        this.token=JSON.parse(localStorage.getItem('userinif')).token;
+        this.pageId=Number(localStorage.getItem('indexs').split('-')[1]);//页面id
+        this.userId=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
+        this.PostTaskAllocationInit() 
+
+        
+    }
+}
+</script>
+<style>
+.AssignTasks-all{
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+    height: 100%;
+    min-height: 840px;
+}
+.AssignTasks-title{
+    font-size: 17px;
+    font-weight: 600;
+}
+.AssignTasks-form{
+    margin-top: 20px;
+}
+.AssignTasks-form-first{
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+}
+.AssignTasks-form-first .el-form-item{
+    width: 350px;
+}
+.AssignTasks-form-first .el-select{
+    width: 100%;
+}
+.AssignTasks-form.el-range-editor.el-input__inner{
+    width: 45%;
+}
+.AssignTasks-btn{
+    text-align:right;
+    padding-top: 20px;
+}
+
+.quill-box{
+    display: flex;
+    align-items: baseline;
+    margin-bottom: 22px;
+}
+.quill-box .ql-container{
+    height: 86%;
+}
+.quill-title{
+    font-size: 14px;
+    color: #606266;
+    width: 70px;
+    text-align: right;
+    padding: 0 12px 0 0;
+}
+.quill-box .editor {
+    line-height: normal !important;
+    height: 300px;
+    width: 96%;
+}
+.quill-box .ql-snow .ql-tooltip[data-mode=link]::before {
+content: "请输入链接地址:";
+}
+.quill-box .ql-snow .ql-tooltip.ql-editing a.ql-action::after {
+    border-right: 0px;
+    content: '保存';
+    padding-right: 0px;
+}
+
+.quill-box .ql-snow .ql-tooltip[data-mode=video]::before {
+    content: "请输入视频地址:";
+}
+
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-label::before,
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-item::before {
+content: '14px';
+}
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
+content: '10px';
+}
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
+content: '18px';
+}
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
+content: '32px';
+}
+
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item::before {
+content: '文本';
+}
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
+content: '标题1';
+}
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
+content: '标题2';
+}
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
+content: '标题3';
+}
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
+content: '标题4';
+}
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
+content: '标题5';
+}
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
+content: '标题6';
+}
+
+.quill-box .ql-snow .ql-picker.ql-font .ql-picker-label::before,
+.quill-box .ql-snow .ql-picker.ql-font .ql-picker-item::before {
+content: '标准字体';
+}
+.quill-box .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,
+.quill-box .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
+content: '衬线字体';
+}
+.quill-box .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,
+.quill-box .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
+content: '等宽字体';
+}
+</style>

+ 333 - 0
src/components/system/MyTasksinif.vue

@@ -0,0 +1,333 @@
+<template>
+    <div>
+        <div class="mytasksinif-all">
+            <div class="mytasksinif-title">任务状态</div>
+            <div class="mytasksinif-form">
+                <el-form label-width="70px" class="demo-ruleForm">
+                    <el-form-item label="指派给" prop="name">
+                        <el-select
+                        :disabled="true"
+                        size="medium"
+                        style="width: 100%;"
+                        v-model="finish.taskperson"
+                        multiple
+                        filterable
+                        allow-create
+                        default-first-option
+                        @change="selectchg"
+                        placeholder="请选择人员">
+                            <el-option
+                            v-for="item in persolist"
+                            :key="item.id"
+                            :label="item.name"
+                            :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                    <div class="mytasksinif-form-first">
+                        <el-form-item label="实际开始" prop="name">
+                            <el-date-picker
+                            style="width:100%;"
+                            v-model="finish.taskperson"
+                            type="datetime"
+                            placeholder="选择日期时间"
+                            default-time="12:00:00">
+                            </el-date-picker>
+                        </el-form-item>
+                        <el-form-item label="实际结束" prop="name">
+                            <el-date-picker
+                            style="width:100%;"
+                            v-model="finish.actuallyOver"
+                            type="datetime"
+                            placeholder="选择日期时间"
+                            default-time="12:00:00">
+                            </el-date-picker>
+                        </el-form-item>
+                    </div>
+                    <div class="quill-box">
+                        <label class="quill-title">任务描述</label>
+                        <quill-editor class="editor"
+                            ref="myTextEditor"
+                            v-model="content"
+                            :options="editorOption"
+                            @blur="onEditorBlur($event)"
+                            @focus="onEditorFocus($event)"
+                            @ready="onEditorReady($event)"
+                            @change="onEditorChange($event)">
+                            <button id="custom-button">defineAsyncComponent</button>
+                        </quill-editor>
+                    </div>
+                </el-form>
+                <div class="mytasksinif-btn">
+                    <el-button size="medium" type="primary">完成</el-button>
+                    <el-button size="medium" @click="goback">取消</el-button>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data () {
+        return {
+            id:'',
+            token:'',
+            pageId:'',
+            userId:'',
+            finish:{
+                taskperson:[],
+                actuallyStarted:'',
+                actuallyOver:'',
+            },
+            persolist: [],
+            //富文本
+            content: null,
+            contents: '',
+            editorOption: {
+                modules: {
+                toolbar: [
+                    ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
+                    ["blockquote", "code-block"], // 引用  代码块
+                    [{ header: 1 }, { header: 2 }], // 1、2 级标题
+                    [{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
+                    [{ script: "sub" }, { script: "super" }], // 上标/下标
+                    [{ indent: "-1" }, { indent: "+1" }], // 缩进
+                    // [{'direction': 'rtl'}],                         // 文本方向
+                    [{ size: ["small", false, "large", "huge"] }], // 字体大小
+                    [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
+                    [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
+                    [{ font: [] }], // 字体种类
+                    [{ align: [] }], // 对齐方式
+                    ["clean"], // 清除文本格式
+                    ["link", "image", "video"], // 链接、图片、视频
+                    ["sourceEditor"]
+                ], //工具菜单栏配置
+                },
+                placeholder: '请在这里添加产品描述', //提示
+                readyOnly: false, //是否只读
+                theme: 'snow', //主题 snow/bubble
+                syntax: true, //语法检测
+            }
+        }
+    },
+    methods: {
+        // 失去焦点
+        onEditorBlur(editor) {
+            this.content=this.contents
+        },
+        // 获得焦点
+        onEditorFocus(editor) {},
+        // 开始
+        onEditorReady(editor) {},
+        // 值发生变化
+        onEditorChange(editor) {
+            console.log(editor);
+            this.contents = editor.text;
+        },
+        selectchg(){
+            console.log(this.values)
+        },
+        //基础数据原
+        PostTaskAllocationInit(){
+            var url = "/api/PersonnelModule/PostTaskAllocationInit"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.userId
+                },
+                data:{
+                    portType:1,
+                    userId: 5
+                }
+            }).then(function (res) {
+                console.log(res)
+                if(res.data.code==200){
+                    that.persolist=res.data.data.executeTaskUserInfos;
+                    that.PostTaskAllocationDetails()
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+            }).catch(function (error) {
+                that.$message.error("获取数据源失败!");
+            });
+        },
+        //获取详情
+        PostTaskAllocationDetails(){
+            if(this.id==undefined){
+                return
+            }
+            var url = "/api/PersonnelModule/PostTaskAllocationDetails"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.userId
+                },
+                data:{
+                    portType:1,
+                    userId: 5,
+                    pageId: that.pageId,
+                    id: that.id,
+                }
+            }).then(function (res) {
+                console.log(res)
+                if(res.data.code==200){
+                    for(var i=0;i<res.data.data.userTaskInfos.length;i++){
+                        that.finish.taskperson.push(res.data.data.userTaskInfos[i].userId);
+                    }
+                    that.content=res.data.data.taskContent;
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+            }).catch(function (error) {
+                that.$message.error("获取详情");
+            });
+        },
+        //返回上一页
+        goback(){
+            this.$router.go(-1);
+        },
+    },
+    computed: {
+        editor() {
+            return this.$refs.myTextEditor.quillEditor;
+        }
+    },
+    mounted(){
+        this.id = Number(this.$route.query.id);
+        this.token=JSON.parse(localStorage.getItem('userinif')).token;
+        this.pageId=Number(localStorage.getItem('indexs').split('-')[1]);//页面id
+        this.userId=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
+        this.PostTaskAllocationInit()
+    }
+}
+</script>
+<style>
+.mytasksinif-all{
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+    height: 100%;
+    min-height: 840px;
+}
+.mytasksinif-title{
+    font-size: 17px;
+    font-weight: 600;
+}
+.mytasksinif-form{
+    margin-top: 20px;
+}
+.mytasksinif-form-first{
+    display: flex;
+    flex-wrap: wrap;
+}
+.mytasksinif-form-first .el-form-item{
+    width: 350px;
+    margin-right: 30px;
+}
+.mytasksinif-form-first .el-select{
+    width: 100%;
+}
+.mytasksinif-form.el-range-editor.el-input__inner{
+    width: 45%;
+}
+.mytasksinif-btn{
+    text-align:right;
+    padding-top: 20px;
+}
+
+.quill-box{
+    display: flex;
+    align-items: baseline;
+    margin-bottom: 22px;
+}
+.quill-box .ql-container{
+    height: 86%;
+}
+.quill-title{
+    font-size: 14px;
+    color: #606266;
+    width: 58px;
+    padding: 0 12px 0 0;
+}
+.quill-box .editor {
+    line-height: normal !important;
+    height: 300px;
+    width: 96%;
+}
+.quill-box .ql-snow .ql-tooltip[data-mode=link]::before {
+content: "请输入链接地址:";
+}
+.quill-box .ql-snow .ql-tooltip.ql-editing a.ql-action::after {
+    border-right: 0px;
+    content: '保存';
+    padding-right: 0px;
+}
+
+.quill-box .ql-snow .ql-tooltip[data-mode=video]::before {
+    content: "请输入视频地址:";
+}
+
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-label::before,
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-item::before {
+content: '14px';
+}
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
+content: '10px';
+}
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
+content: '18px';
+}
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,
+.quill-box .ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
+content: '32px';
+}
+
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item::before {
+content: '文本';
+}
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
+content: '标题1';
+}
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
+content: '标题2';
+}
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
+content: '标题3';
+}
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
+content: '标题4';
+}
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
+content: '标题5';
+}
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
+.quill-box .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
+content: '标题6';
+}
+
+.quill-box .ql-snow .ql-picker.ql-font .ql-picker-label::before,
+.quill-box .ql-snow .ql-picker.ql-font .ql-picker-item::before {
+content: '标准字体';
+}
+.quill-box .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,
+.quill-box .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
+content: '衬线字体';
+}
+.quill-box .ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,
+.quill-box .ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
+content: '等宽字体';
+}
+</style>

+ 385 - 0
src/components/system/TaskList.vue

@@ -0,0 +1,385 @@
+<template>
+    <div>
+        <div class="tasklist-all">
+            
+            <div class="tasklist-head">
+                <el-form style="display: flex;justify-content: space-between;align-items: center;" label-width="70px" class="demo-ruleForm">
+                    <div class="tasklist-head-select">
+                        <el-form-item label="任务名称" prop="name">
+                            <el-select size="medium" @change="changetasknames" filterable  v-model="tasknames" placeholder="请选择">
+                                <el-option
+                                    v-for="item in tasknamelist"
+                                    :key="item"
+                                    :label="item"
+                                    :value="item">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="完成状态" prop="name">
+                            <el-select @change="changecompletionstatus" size="medium" filterable v-model="completionstatus" placeholder="请选择">
+                                <el-option
+                                    v-for="item in completionstatuslist"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <!-- <el-form-item label="指派类型" prop="name">
+                            <el-select @change="changeassignmenttype" size="medium" filterable v-model="assignmenttype" placeholder="请选择">
+                                <el-option
+                                    v-for="item in assignmenttypelist"
+                                    :key="item.id"
+                                    :label="item.name"
+                                    :value="item.id">
+                                </el-option>
+                            </el-select>
+                        </el-form-item> -->
+                    </div>
+                    <el-button size="medium" @click="handleView" type="primary">新增任务</el-button>
+                </el-form>
+            </div>
+            <div class="tasklist-title">任务列表</div>
+            <div class="tasklist-table">
+                <el-table
+                :data="tableData"
+                border
+                style="width: 100%">
+                    <el-table-column
+                    prop="taskName"
+                    label="任务名称">
+                    </el-table-column>
+                    <el-table-column
+                    prop="taskPriority"
+                    label="优先级"
+                    width="70">
+                    </el-table-column>
+                    <el-table-column
+                    prop="participant"
+                    label="指派给"
+                    width="200">
+                    </el-table-column>
+                    <el-table-column
+                    prop="status"
+                    label="状态"
+                    width="80">
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.status==0">
+                            未开始
+                        </span>
+                        <span v-if="scope.row.status==1">
+                            进行中
+                        </span>
+                        <span v-if="scope.row.status==2">
+                            待审核
+                        </span>
+                        <span v-if="scope.row.status==3">
+                            未完成
+                        </span>
+                        <span v-if="scope.row.status==4">
+                            已完成
+                        </span>
+                    </template>
+                        <!-- <template v-if="status" slot-scope="scope">
+                            {{ scope.row.status==0? scope.row.status==1?:'全部'  }}
+                        </template> -->
+                    </el-table-column>
+                    <el-table-column
+                    prop="consummator"
+                    label="完成者"
+                    width="100">
+                    </el-table-column>
+                    <el-table-column
+                    prop="depName"
+                    label="归属部门"
+                    width="100">
+                    </el-table-column>
+                    <el-table-column
+                    prop="date"
+                    label="截止"
+                    width="100">
+                    </el-table-column>
+                    <el-table-column
+                    prop="date"
+                    label="预计起止时间"
+                    width="200">
+                        <template slot-scope="scope">
+                            {{ scope.row.predictBeginTime }}~{{ scope.row.predictEndTime }}
+                        </template>
+                    </el-table-column>
+                    <el-table-column
+                    prop="createUserName"
+                    label="创建者"
+                    width="100">
+                    </el-table-column>
+                    <el-table-column
+                    prop="createTime"
+                    label="创建时间"
+                    width="180">
+                    </el-table-column>
+                    <el-table-column
+                    label="操作"
+                    width="180">
+                        <template slot-scope="scope">
+                            <el-button
+                            type="text"
+                            size="small">
+                            开始
+                            </el-button>
+                            <el-button
+                            type="text"
+                            size="small">
+                            完成
+                            </el-button>
+                            <el-button
+                            @click.native.prevent="taskedit(scope.$index, scope.row)"
+                            type="text"
+                            size="small">
+                            编辑
+                            </el-button>
+                            <el-button
+                            @click.native.prevent="deleteRow(scope.$index, tableData)"
+                            type="text"
+                            size="small">
+                            移除
+                            </el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <div class="block">
+                    <el-pagination
+                    @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange"
+                    :current-page="currentPage"
+                    :page-sizes="[1,5, 10, 15, 20]"
+                    :page-size="pagesize"
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="count">
+                    </el-pagination>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data () {
+        return {
+            token:'',
+            pageId:'',
+            userId:'',
+            jobName:'',
+            tasknames:"",
+            tasknamelist:[],
+            completionstatus:-1,
+            completionstatuslist:[
+                {
+                    id:-1,
+                    name:'全部'
+                },
+                {
+                    id:0,
+                    name:'未开始'
+                },
+                {
+                    id:1,
+                    name:'进行中'
+                },
+                {
+                    id:2,
+                    name:'待审核'
+                },
+                {
+                    id:3,
+                    name:'未完成'
+                },
+                {
+                    id:4,
+                    name:'已完成'
+                },
+            ],
+            assignmenttype:0,
+            assignmenttypelist:[
+                {
+                    id:0,
+                    name:'全部'
+                },
+                {
+                    id:1,
+                    name:'由我指派'
+                },
+                {
+                    id:2,
+                    name:'指派给我'
+                },
+            ],
+
+            tableData: [],
+            value: '',
+            pagesize:10,
+            currentPage: 1,
+            count:0,
+        }
+    },
+    methods: {
+        //基础数据原
+        PostTaskAllocationInit(){
+            var url = "/api/PersonnelModule/PostTaskAllocationInit"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.userId
+                },
+                data:{
+                    portType:1,
+                    userId: that.userId
+                }
+            }).then(function (res) {
+                console.log(res)
+                if(res.data.code==200){
+                    that.tasknamelist=res.data.data.taskNameInfos;
+                    that.PostTaskAllocationPage()
+                }else{
+                    that.$message.error(res.data.msg);
+                }
+            }).catch(function (error) {
+                that.$message.error("获取数据源失败!");
+            });
+        },
+        //获取列表
+        PostTaskAllocationPage(){
+            if(this.jobName.indexOf('经理')!=-1||this.jobName.indexOf('主管')!=-1){
+                this.assignmenttype=0;
+            }else{
+                this.assignmenttype=2;
+            }
+            var url = "/api/PersonnelModule/PostTaskAllocationPage"
+            var that = this
+            this.$axios({
+                method: 'post',
+                url: url,
+                headers: {
+                    Authorization: 'Bearer ' + that.userId
+                },
+                data:{
+                    portType:1,
+                    userId: that.userId,
+                    pageId: that.pageId,
+                    pageIndex: that.currentPage,
+                    pageSize: that.pagesize,
+                    type: that.assignmenttype,
+                    status: that.completionstatus,
+                    taskName: that.tasknames,
+                }
+            }).then(function (res) {
+                console.log(res)
+                if(res.data.code==200){
+                    that.count=res.data.count;
+                    that.tableData=res.data.data;
+                }else{
+                    
+                }
+            }).catch(function (error) {
+                that.$message.error("获取数据源失败!");
+            });
+        },
+        deleteRow(index, rows) {
+            rows.splice(index, 1);
+        },
+        //每页条数改变时触发 选择一页显示多少行
+        handleSizeChange(val) {
+            this.currentPage = 1;
+            this.pagesize = val;
+            this.PostTaskAllocationPage()
+        },
+        //当前页改变时触发 跳转其他页
+        handleCurrentChange(val) {
+            this.currentPage = val;
+            this.PostTaskAllocationPage()
+        },
+        //xinzhen
+        handleView() {
+            this.$router.push({path: '/home/AssignTasks'});
+            // this.$router.push({path: '/home/Reportstbale?id=' + row.id +''});
+        },
+        changetasknames(){
+            this.currentPage = 1;
+            this.PostTaskAllocationPage()
+        },
+        changecompletionstatus(){
+            this.currentPage = 1;
+            this.PostTaskAllocationPage()
+        },
+        changeassignmenttype(){
+            this.currentPage = 1;
+            this.PostTaskAllocationPage()
+        },
+        //编辑
+        taskedit(index,val){
+            // this.$router.push({path: '/home/AssignTasks?id='+val.id+''});
+            // this.$router.push({path: '/home/MyTasksinif?id='+val.id+''});
+            var cnName=JSON.parse(localStorage.getItem('userinif')).userInfo.cnName;
+            if(val.createUserName==cnName){
+                this.$router.push({path: '/home/AssignTasks?id='+val.id+''});
+            }else{
+                if(val.participant.indexOf(cnName)!=-1){
+                    this.$router.push({path: '/home/MyTasksinif?id='+val.id+''});
+                }else{
+                    this.$message.error("此任务被指派人没有此账号!");
+                }
+            }
+            console.log(val,cnName);
+        },
+    },
+    filters:{
+        filter_city(value){
+            if(value){
+                return value.replaceAll('|','、')
+            }
+        },
+        filter_time(value){
+            if(value){
+                return value.split(" ")[0]
+            }
+        }
+    },
+    mounted(){
+        this.token=JSON.parse(localStorage.getItem('userinif')).token;
+        this.pageId=Number(localStorage.getItem('indexs').split('-')[1]);//页面id
+        this.userId=JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
+        this.jobName=JSON.parse(localStorage.getItem('userinif')).userInfo.jobName;
+        this.PostTaskAllocationInit()
+    }
+}
+</script>
+<style>
+.tasklist-all{
+    background-color: #fff;
+    padding: 10px;
+    box-shadow: 0 0 5px #0005;
+    border-radius: 10px;
+    min-height: 830px;
+}
+.tasklist-title{
+    font-size: 17px;
+    font-weight: 600;
+    margin-bottom: 5px;
+}
+.tasklist-head-select{
+    display: flex;
+}
+.tasklist-head-select .el-form-item{
+    margin-bottom: 15px;
+    margin-right: 15px;
+    
+}
+.tasklist-head-select .el-select{
+    width: 200px;
+}
+.tasklist-table .block{
+    text-align: center;
+    margin-top: 15px;
+}
+</style>

+ 1 - 1
src/main.js

@@ -35,7 +35,7 @@ Vue.prototype.$axios = axios;
 
 Vue.config.productionTip = false
 Vue.use(ElementUI);
-Vue.prototype.dateFormat = function (time) {
+Vue.prototype.transformDateFormat = function (time) {
   var date = new Date(time);
   var year = date.getFullYear();
   /* 在日期格式中,月份是从0开始的,因此要加0

+ 18 - 0
src/router/index.js

@@ -94,6 +94,9 @@ import Customers from '@/components/OP/Customers';
 import OpCustomers from '@/components/OP/OpCustomers';
 import Reportstbale from '@/components/statistics/Reportstbale';
 import PickupList from '@/components/OP/PickupList';
+import TaskList from '@/components/system/TaskList';
+import AssignTasks from '@/components/system/AssignTasks';
+import MyTasksinif from '@/components/system/MyTasksinif';
 
 
 
@@ -554,6 +557,21 @@ export default new Router({
           name: 'PickupList',
           component: PickupList
         },
+        {
+          path: '/home/TaskList',
+          name: 'TaskList',
+          component: TaskList
+        },
+        {
+          path: '/home/AssignTasks',
+          name: 'AssignTasks',
+          component: AssignTasks
+        },
+        {
+          path: '/home/MyTasksinif',
+          name: 'MyTasksinif',
+          component: MyTasksinif
+        },
       ]
     },
     {