From 2d3e6f1c305f2d27f54f934afce278571336e681 Mon Sep 17 00:00:00 2001 From: Panzihang <819652404@qq.com> Date: Thu, 16 Nov 2023 18:04:18 +0800 Subject: [PATCH] 11.16 --- .../Winglau14-loutsLoading.css | 2 +- components/head-info/head-info.vue | 116 ++- components/u-input/emitter.js | 55 ++ components/u-input/index.vue | 320 +++++++ pages.json | 12 +- pages/discharge/index.vue | 8 +- pages/index/index.vue | 14 +- pages/login/index.vue | 4 +- pages/quality/details.vue | 40 +- pages/quality/edit.vue | 905 +++++++++++------- pages/quality/index.vue | 44 +- pages/quality/sign.vue | 64 +- pages/quality/zsEdit.vue | 64 +- pages/shipWork/index.vue | 37 +- pages/shipWork/untieSign.vue | 4 +- static/images/gqIcon.png | Bin 0 -> 1188 bytes static/images/sys.png | Bin 0 -> 1062 bytes 17 files changed, 1207 insertions(+), 482 deletions(-) create mode 100644 components/u-input/emitter.js create mode 100644 components/u-input/index.vue create mode 100644 static/images/gqIcon.png create mode 100644 static/images/sys.png diff --git a/components/Winglau14-lotusLoading/Winglau14-loutsLoading.css b/components/Winglau14-lotusLoading/Winglau14-loutsLoading.css index 2272f39..0cb1f14 100644 --- a/components/Winglau14-lotusLoading/Winglau14-loutsLoading.css +++ b/components/Winglau14-lotusLoading/Winglau14-loutsLoading.css @@ -3,7 +3,7 @@ top: 0; width: 100%; height: 100%; - z-index: 999; + z-index: 99999999999999999999999999999; background: rgba(255, 255, 255, 0); /*display: -webkit-box; display: -webkit-flex;*/ diff --git a/components/head-info/head-info.vue b/components/head-info/head-info.vue index 69240c4..8c7e1ec 100644 --- a/components/head-info/head-info.vue +++ b/components/head-info/head-info.vue @@ -28,18 +28,25 @@

{{userInfo.name}}

{{userInfo.phone}}

+ + + +

请选择港区

+
+ + + {{item.pamName}} + + +
+ + 退出登录 + - - - 切换港区 - - - - 退出登录 - @@ -155,6 +162,7 @@ }, mounted() { this.loginObj = uni.getStorageSync('loginObj') + this.initData() this.activeIndex = uni.getStorageSync("selectPortIndex") this.navList[this.navIndex].type = true this.getUser() @@ -171,7 +179,6 @@ method: 'GET', //请求方式,必须为大写 success: (res) => { this.userInfo = res.data.data - console.log(this.userInfo) uni.setStorageSync('userInfo', this.userInfo) }, fail: function(err) { @@ -219,11 +226,11 @@ }) } } - if (this.portList.length > 0) { - this.$refs.popup.open(this.type) - this.portId = this.portList[this.activeIndex].pamId - this.portName = this.portList[this.activeIndex].pamName - } + // if (this.portList.length > 0) { + // this.$refs.popup.open(this.type) + // this.portId = this.portList[this.activeIndex].pamId + // this.portName = this.portList[this.activeIndex].pamName + // } } } }) @@ -354,6 +361,7 @@ this.portName = item.pamName this.portId = item.pamId this.activeIndex = index + this.toGo() }, // 确认弹框 toGo() { @@ -396,7 +404,7 @@ }, // 确认退出登录 outConfirm() { - uni.navigateTo({ + uni.reLaunch({ url: '/pages/login/index' }) }, @@ -424,8 +432,6 @@ .headInfo { width: 100%; - height: 66px; - line-height: 50px; background-color: #fff; box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.10); border-radius: 1px; @@ -507,7 +513,6 @@ .infoList { width: 200px; - padding: 10px 20px; background-color: #fff; z-index: 999; display: flex; @@ -516,13 +521,80 @@ position: absolute; right: 2px; top: 60px; - box-shadow: 1px 1px 6px 0 rgba(52, 52, 52, 0.20); + box-shadow: 0 -2px 12px 0 rgba(0, 0, 0, 0.20); + + + .userInfo { + color: #23262E; + border-bottom: 1px solid #F0F0F0; + padding: 16px 0px; + margin: 0 16px; + + p:first-child { + font-size: 18px; + font-weight: bold; + margin-bottom: 8px; + } + + p:last-child { + font-size: 14px; + } + } + + .btnCss { + width: 100%; + height: 42px; + line-height: 42px; + text-align: center; + font-size: 16px; + color: #0067CF; + border-top: 1px solid #F0F0F0; + border-radius: 0 0 4px 4px; + } .borTop { - border-top: 1px #ccc solid; + .borHead { + display: flex; + margin-left: 16px; + margin-top: 12px; - /deep/.uni-icons { - margin-right: 10px; + image { + width: 16px; + height: 16px; + margin-right: 8px; + } + + p { + font-size: 16px; + color: #999999; + } + } + + .borContent { + width: 100%; + height: 120px; + overflow: scroll; + display: flex; + flex-direction: column; + padding: 0 16px; + margin-top: 12px; + + .gqContent { + width: 100%; + height: 36px; + line-height: 36px; + text-align: center; + background: rgba(0, 103, 207, 0.05); + border-radius: 8px; + font-size: 14px; + color: #23262E; + margin-bottom: 8px; + } + + .activeGq { + background: #0067CF; + color: #fff; + } } } } diff --git a/components/u-input/emitter.js b/components/u-input/emitter.js new file mode 100644 index 0000000..7af43d2 --- /dev/null +++ b/components/u-input/emitter.js @@ -0,0 +1,55 @@ +/** + * 递归使用call方式 this指向 + * + * @param {String} componentName 需要查找的组件的名称 + * @param {String} eventName 事件名称 + * @param {Object} params 需要传递的参数 + */ +function broadcast(componentName, eventName, params) { + // 循环子节点找到需要的节点,没有查找到就递归进行查找 + this.$children.map(child => { + if (componentName === child.$options.name) { + child.$emit.apply(child, [eventName].concat(params)) + } else { + broadcast.apply(child, [componentName, eventName].concat(params)) + } + }) +} + +export default { + methods: { + /** + * 派发 向上查找一个 + * @param {Object} componentName 需要查找的组件的名称 + * @param {Object} eventName 事件名称 + * @param {Object} params 需要传递的参数 + */ + dispatch(componentName, eventName, params) { + // 找到最近父节点 $root 根节点 + let parent = this.$parent || this.$root + // 获取当前实例的名称 + let name = parent.$options.name + + // 当前存在节点并且当前节点没有名称或者名称不等于我们要查找的节点名称,则继续遍历 + while (parent && (!name || name !== componentName)) { + parent = parent.$parent + if (parent) { + name = parent.$options.name + } + } + // 如果有节点则表示找到 + if (parent) { + parent.$emit.apply(parent, [eventName].concat(params)) + } + }, + /** + * 广播 向下查找多个 + * @param {Object} componentName 需要查找的组件的名称 + * @param {Object} eventName 事件名称 + * @param {Object} params 需要传递的参数 + */ + broadcast(componentName, eventName, params) { + broadcast.call(this, componentName, eventName, params) + } + } +} \ No newline at end of file diff --git a/components/u-input/index.vue b/components/u-input/index.vue new file mode 100644 index 0000000..6ef167e --- /dev/null +++ b/components/u-input/index.vue @@ -0,0 +1,320 @@ +