diff --git a/public/images/refresh.png b/public/images/refresh.png new file mode 100644 index 000000000..ccc8ca7a8 Binary files /dev/null and b/public/images/refresh.png differ diff --git a/src/assets/js/utils/refresh.js b/src/assets/js/utils/refresh.js new file mode 100644 index 000000000..59e6e7cf5 --- /dev/null +++ b/src/assets/js/utils/refresh.js @@ -0,0 +1,22 @@ +export default { + refreshImg() { + if (window.WebViewJavascriptBridge) { + EWebBridge.webCallAppInJs('webview_right_button', { + btns: [ + { + img: 'images/refresh.png', + route: { + flag: '', + extra: {} + } + } + ] + }) + } + }, + refreshCallBack(data) { + if (data.trigger == 'right_button_click') { + location.reload() + } + } +} diff --git a/src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue b/src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue index 294f8ecc9..da591fabe 100644 --- a/src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue +++ b/src/views/ebiz/institutionalPerform/InstitutionalManpower/index.vue @@ -56,7 +56,7 @@ import Selectors from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/Selectors' import util from '@/views/ebiz/institutionalPerform/InstitutionalManpower/components/js/util' import { branchOfficeApi } from '@/api/ebiz/branchOffice/branchOffice' -import refreshLogo from '@/assets/images/ebiz/refresh.png' +import refresh from '@/assets/js/utils/refresh' import { Tabs, Tab } from 'vant' export default { name: 'InstitutionalManpower', @@ -74,8 +74,6 @@ export default { items: [], bzbfTotol: 0, queryColumns: ['活动人力', '合格人力', '桂冠人力', '新增人力'], - - refreshLogo, active: 1, // 当前的机构编码 curCode: '', @@ -92,7 +90,7 @@ export default { this.items=[] this.queryColumns.forEach(() => { - this.items.push('0.00') + this.items.push('0') }) } else { let sum1 = 0 @@ -214,22 +212,25 @@ export default { }, created() { if (process.env.NODE_ENV != 'development') { - setTimeout(() => { - // eslint-disable-next-line no-undef - EWebBridge.webCallAppInJs('webview_right_button', { - btns: [ - { - img: this.$assetsUrl + 'images/ebiz/refresh.png', - route: { - flag: '', - extra: { - url: location.origin + '/#/institutionalPerform/BranchOffice' - } - } - } - ] - }) - }, 1000) + + refresh.refreshImg() + window.appCallBack=refresh.refreshCallBack() + // setTimeout(() => { + // // eslint-disable-next-line no-undef + // EWebBridge.webCallAppInJs('webview_right_button', { + // btns: [ + // { + // img: 'images/refresh.png', + // route: { + // flag: '', + // extra: { + // url: location.origin + '/#/institutionalPerform/BranchOffice' + // } + // } + // } + // ] + // }) + // }, 1000) } }, mounted() {