diff --git a/app/Http/Middleware/WebApi.php b/app/Http/Middleware/WebApi.php index 7ebde030..1c96b72f 100644 --- a/app/Http/Middleware/WebApi.php +++ b/app/Http/Middleware/WebApi.php @@ -2,7 +2,7 @@ namespace App\Http\Middleware; -@error_reporting(E_ALL & ~E_NOTICE); +@error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); use Closure; diff --git a/app/Models/User.php b/app/Models/User.php index b62287f0..607a6526 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -93,7 +93,11 @@ class User extends AbstractModel */ public function getUserimgAttribute($value) { - return $value ? Base::fillUrl($value) : url('images/other/avatar.png'); + if ($value) { + return Base::fillUrl($value); + } + $name = ($this->userid - 1) % 21 + 1; + return url("images/avatar/default_{$name}.png"); } /** diff --git a/app/Module/Ihttp.php b/app/Module/Ihttp.php index 14c1ee64..bacefe32 100755 --- a/app/Module/Ihttp.php +++ b/app/Module/Ihttp.php @@ -4,7 +4,7 @@ namespace App\Module; use Exception; -@error_reporting(E_ALL & ~E_NOTICE); +@error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); class Ihttp { diff --git a/app/Services/WebSocketService.php b/app/Services/WebSocketService.php index 7054ad8e..bd612831 100644 --- a/app/Services/WebSocketService.php +++ b/app/Services/WebSocketService.php @@ -2,7 +2,7 @@ namespace App\Services; -@error_reporting(E_ALL & ~E_NOTICE); +@error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); use App\Models\User; use App\Models\WebSocket; diff --git a/app/Tasks/IhttpTask.php b/app/Tasks/IhttpTask.php index 6b853e8a..6c3ffc1f 100644 --- a/app/Tasks/IhttpTask.php +++ b/app/Tasks/IhttpTask.php @@ -1,7 +1,7 @@ /dev/null + docker --version &> /dev/null if [ $? -ne 0 ]; then echo -e "${Error} ${RedBG} 未安装 Docker!${Font}" exit 1 fi - docker-compose --help &> /dev/null + docker-compose --version &> /dev/null if [ $? -ne 0 ]; then echo -e "${Error} ${RedBG} 未安装 Docker-compose!${Font}" exit 1 @@ -46,7 +46,7 @@ check_docker() { } check_node() { - npm --help &> /dev/null + npm --version > /dev/null if [ $? -ne 0 ]; then echo -e "${Error} ${RedBG} 未安装nodejs!${Font}" exit 1 diff --git a/docker/php/php.conf b/docker/php/php.conf index 74f52c2d..b72399d4 100644 --- a/docker/php/php.conf +++ b/docker/php/php.conf @@ -2,10 +2,10 @@ directory=/var/www # 生产环境 -command=php bin/laravels start -i +#command=php bin/laravels start -i # 开发环境 -#command=./bin/inotify ./app +command=./bin/inotify ./app numprocs=1 autostart=true diff --git a/package.json b/package.json index 8a915c6c..c1004e75 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,9 @@ "axios": "^0.21", "cross-env": "^7.0.2", "css-loader": "^5.2.6", + "echarts": "^5.1.1", + "electron": "^13.1.6", + "element-ui": "^2.15.2", "file-loader": "^6.2.0", "inquirer": "^8.1.1", "internal-ip": "^6.2.0", @@ -24,33 +27,28 @@ "moment": "^2.29.1", "nativefier": "^44.0.4", "node-sass": "^4.11.0", + "notification-koro1": "^1.1.1", "postcss": "^8.1.14", "resolve-url-loader": "^4.0.0", "sass": "^1.34.1", "sass-loader": "^8.0.2", "stylus": "^0.54.8", "stylus-loader": "^3.0.2", - "vue": "^2.6.12", - "vue-loader": "^15.9.7", - "vue-router": "^3.4.2", - "vue-template-compiler": "^2.6.11", - "vuex": "^3.6.2", - "webpack": "^5.38.1", - "webpack-cli": "^4.7.0" - }, - "dependencies": { - "echarts": "^5.1.1", - "electron": "^13.1.6", - "element-ui": "^2.15.2", - "notification-koro1": "^1.1.1", "tinymce": "^5.8.1", "tui-calendar-hi": "^1.13.0-5", - "view-design-hi": "^4.6.1-2", + "view-design-hi": "^4.6.1-9", + "vue": "^2.6.12", "vue-clipboard2": "^0.3.1", "vue-emoji-picker": "^1.0.1", "vue-kityminder-gg": "^1.3.6", + "vue-loader": "^15.9.7", "vue-resize-observer": "^1.0.37", + "vue-router": "^3.4.2", + "vue-template-compiler": "^2.6.11", "vuedraggable": "^2.24.3", + "vuex": "^3.6.2", + "webpack": "^5.38.1", + "webpack-cli": "^4.7.0", "xlsx": "^0.17.0" } } diff --git a/resources/assets/js/components/AutoTip.vue b/resources/assets/js/components/AutoTip.vue index 48f5891d..a550a4bb 100644 --- a/resources/assets/js/components/AutoTip.vue +++ b/resources/assets/js/components/AutoTip.vue @@ -1,15 +1,15 @@ @@ -40,44 +40,22 @@ data() { return { - slotText: '', - showTooltip: false // 鼠标滑过overflow文本时,再检查是否需要显示 + showTooltip: false, // 鼠标滑过overflow文本时,再检查是否需要显示 + tooltipContent: '', } }, - mounted () { - this.updateConetne() - }, - - beforeUpdate () { - this.updateConetne() - }, - - activated() { - this.updateConetne() - }, - computed: { - text() { - const {content, slotText} = this; - if (content) { - return content; - } - if (typeof slotText === 'undefined' || slotText.length < 1 || typeof slotText[0].text !== 'string') { - return ''; - } - return slotText[0].text; + tipText() { + const {content, tooltipContent} = this; + return content || tooltipContent || ""; }, existSlot() { - const {slotText} = this; - return !(typeof slotText === 'undefined' || slotText.length < 1); + return !(typeof this.$slots.default === 'undefined' || this.$slots.default.length < 1); }, }, methods: { - updateConetne () { - this.slotText = this.$slots.default; - }, handleTooltipIn () { const $content = this.$refs.content; let range = document.createRange(); @@ -85,6 +63,14 @@ range.setEnd($content, $content.childNodes.length); const rangeWidth = range.getBoundingClientRect().width; this.showTooltip = Math.floor(rangeWidth) > Math.floor($content.offsetWidth); + if (this.showTooltip && this.existSlot) { + const tmpArray = this.$slots.default.map((e) => { + if (e.text) return e.text + if (e.elm.innerText) return e.elm.innerText + return "" + }) + this.tooltipContent = tmpArray.join(""); + } range = null; }, onClick(e) { diff --git a/resources/assets/js/components/DrawerOverlay.vue b/resources/assets/js/components/DrawerOverlay.vue index c2f6ce1a..3ccdabf1 100644 --- a/resources/assets/js/components/DrawerOverlay.vue +++ b/resources/assets/js/components/DrawerOverlay.vue @@ -1,5 +1,6 @@ @@ -87,7 +86,12 @@ escClose(e) { if (this.value && this.escClosable) { if (e.keyCode === 27) { - this.close() + let show = false; + $A(".ivu-modal").each((i, e) => { + show = $(e).is(":visible"); + return !show; + }) + !show && this.close() } } } diff --git a/resources/assets/js/components/ImgUpload.vue b/resources/assets/js/components/ImgUpload.vue index 3aea1a53..c5baaea4 100755 --- a/resources/assets/js/components/ImgUpload.vue +++ b/resources/assets/js/components/ImgUpload.vue @@ -200,7 +200,7 @@ if (typeof items === 'string') { items = [{'url': items}]; } - let lists = []; + let list = []; $A.each(items, (index, item)=>{ if (typeof item === 'string') item = {'url': item}; if (item.url) { @@ -208,10 +208,10 @@ item.status = 'finished'; if (typeof item.path === 'undefined') item.path = item.url; if (typeof item.thumb === 'undefined') item.thumb = item.url; - lists.push(item); + list.push(item); } }); - return lists; + return list; }, handleView (item) { //查看 diff --git a/resources/assets/js/components/Loading.vue b/resources/assets/js/components/Loading.vue index b60b4556..1fa82b6f 100644 --- a/resources/assets/js/components/Loading.vue +++ b/resources/assets/js/components/Loading.vue @@ -1,9 +1,19 @@ diff --git a/resources/assets/js/components/QuickEdit.vue b/resources/assets/js/components/QuickEdit.vue index 12f5f080..a687f9a6 100644 --- a/resources/assets/js/components/QuickEdit.vue +++ b/resources/assets/js/components/QuickEdit.vue @@ -1,7 +1,8 @@