| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <template>
- <view>
- <view class="" style="width: 100%;height: 30rpx;background-color: #f7f7f7;">
-
- </view>
- <taskdetails :taskshow="taskshow" :istask="istask" @tosubm="tosubm" @toinsect="toinsect" @tolist="tolist" ref="child"></taskdetails>
- </view>
- </template>
- <script>
- import taskdetails from "../../components/task-details.vue"
- export default {
- components:{
- taskdetails
- },
- data() {
- return {
- taskshow:false,
- istask:2,
- taskid:''
- }
- },
- watch: {
- videoData(news, old) {
- console.log('触发了2222222222222222222222')
- console.log(news)
- uni.switchTab({
- url: '../response/index'
- })
- // if (news) {
- // }
- },
- },
- computed: {
- // 视频消息
- videoData() {
- return this.$store.state.video
- },
- },
- methods: {
- tosubm(){
- uni.navigateTo({
- url:"./submitsupe?id="+this.taskid
- })
- },
- toinsect(item){
- uni.navigateTo({
- url:"../insectpest/insectpest?id="+item
- })
- },
- tolist(id){
- uni.navigateTo({
- url:"../insectpest/baselist?id="+id+"&taskshow="+this.taskshow
- })
- }
- },
- onNavigationBarButtonTap(e){
- if(this.istask==2){
- this.tosubm()
- }
- },
- onLoad(option) {
- this.taskid = Number(option.id)
- let pages = getCurrentPages();
- console.log(pages.length,'--------------- onload')
- var page = pages[pages.length - 1];
- var currentWebview = page.$getAppWebview();
- if(this.istask==1){
- currentWebview.setTitleNViewButtonStyle(0, {
- text: "提交",
- });
- }else if(this.istask == 2){
- currentWebview.setTitleNViewButtonStyle(0, {
- text: "监督",
- });
- }else{
- currentWebview.setTitleNViewButtonStyle(0, {
- text: " ",
- });
- }
- this.$nextTick(()=>{
- this.$refs.child.gettaskinfo(option.id)
- })
- // this.$refs.child.no()
- }
- }
- </script>
- <style>
- </style>
|