4 files modified
1 files deleted
| | |
| | | "stylelint": "stylelint \"src/**/*.{vue,scss,css,sass,less}\"", |
| | | "stylelint:fix": "stylelint \"src/**/*.{vue,scss,css,sass,less}\" --fix", |
| | | "cz": "git add . && npx czg", |
| | | "postinstall": "simple-git-hooks", |
| | | "clean": "npx rimraf node_modules", |
| | | "clean:cache": "npx rimraf node_modules/.cache" |
| | | }, |
| | |
| | | "rollup-plugin-visualizer": "^6.0.3", |
| | | "sass": "1.79.6", |
| | | "sass-loader": "^16.0.4", |
| | | "simple-git-hooks": "^2.13.1", |
| | | "stylelint": "^16.23.0", |
| | | "stylelint-config-recess-order": "^6.1.0", |
| | | "stylelint-config-standard": "^39.0.0", |
| | |
| | | "vue": "3.4.21" |
| | | } |
| | | }, |
| | | "simple-git-hooks": { |
| | | "pre-commit": "npx lint-staged", |
| | | "commit-msg": "node ./scripts/verify-commit.js" |
| | | }, |
| | | "lint-staged": { |
| | | "src/**/*.{js,jsx}": "eslint --fix", |
| | | "*.{scss,css,style,html}": "stylelint --fix", |
| | |
| | | "stylelint --fix" |
| | | ] |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/droneConsole/index", |
| | | "path": "pages/inspectionTask/TaskDetails/TaskDetails", |
| | | "style": { |
| | | "navigationBarTitleText": "控制台", |
| | | "navigationBarTitleText": "已执行", |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | |
| | | <template> |
| | | <view class="page-wrap"> |
| | | <web-view |
| | | ref="sWebViewRef" |
| | | :src='`${viewUrl}?token=${token}&wayLineJodInfoId=${active.id}`' |
| | | @message="onPostMessage" |
| | | @onPostMessage="onPostMessage" |
| | | /> |
| | | </view> |
| | | <WebViewPlus :src="`${viewUrl}`" @webMessage="onPostMessage"/> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {onLoad} from "@dcloudio/uni-app"; |
| | | import {useUserStore} from "@/store/index.js"; |
| | | import WebViewPlus from "@/components/WebViewPlus.vue"; |
| | | |
| | | const active = defineModel('active') |
| | | const sWebViewRef = ref(null) |
| | | const viewUrl = 'http://192.168.1.15:5173/drone-app-web-view/#/appTaskDetails' |
| | | const userStore = useUserStore() |
| | | const token = computed(() => userStore?.userInfo?.access_token) |
| | | const viewUrl = `http://192.168.1.15:5174/drone-app-web-view/#/appTaskDetails?params=${JSON.stringify(userStore?.userInfo)}`; |
| | | |
| | | function onPostMessage(event) { |
| | | if (event.detail.data[0].type === 'back') { |
| | | active.value = null |
| | | |
| | | |
| | | function onPostMessage(data) { |
| | | if (data.type === 'back'){ |
| | | uni.navigateBack() |
| | | } |
| | | } |
| | | |
| | | onLoad(() => { |
| | | window.addEventListener('message', function (e) { |
| | | if (e.data.data.type === 'back') { |
| | | active.value = null |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | |
| | | const sWebViewRef = ref(null); |
| | | const userStore = useUserStore(); |
| | | const viewUrl = `http://192.168.1.178:5173/drone-app-web-view/#/webViewWrapper/inspectionTask?params=${JSON.stringify(userStore?.userInfo)}`; |
| | | const viewUrl = `http://192.168.1.15:5174/drone-app-web-view/#/webViewWrapper/inspectionTask?params=${JSON.stringify(userStore?.userInfo)}`; |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | |