{"version":3,"sources":["webpack:///./src/views/apps/shuffle/index.vue","webpack:///src/views/apps/shuffle/index.vue","webpack:///./src/views/apps/shuffle/index.vue?0b6e","webpack:///./src/views/apps/shuffle/index.vue?07e0"],"names":["render","_vm","this","_c","_self","staticClass","attrs","concat","$store","state","app","activeGroup","publicPage","layout","comps","length","staticStyle","_l","comp","i","key","st1","staticRenderFns","_","require","components","loaderWeb","component","loading","AsyncLoading","error","AsyncLoadError","delay","timeout","loaderDynamic","data","news","modal","title","task","taskShow","showCourse","course","courseInfos","locationHref","contactHref","mounted","isMobile","$router","push","name","init","$route","params","id","methods","toggleBodyClass","addRemoveClass","className","el","document","body","classList","add","remove","pageId","_page","pages","filter","x","loadSingleContent","loadListContent","loadComponents","initHeaderTop","_location","_contact","page","locTypeId1","organizationTaskId","e","_this","request","api","method","url","store","then","res","compBox","b","ot","loadBox","boxId","_this2","skip","size","sortBy","tasks","ord","watch","newRoute","oldRoute","_this3","Object","assign","$data","$options","$nextTick"],"mappings":"yHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,iBAAiB,CAACG,MAAM,CAAC,IAAK,UAAAC,OAAWN,EAAIO,OAAOC,MAAMC,IAAIC,YAAYC,WAAWC,WAAiC,GAApBZ,EAAIa,MAAMC,OAAaZ,EAAG,MAAM,CAACa,YAAY,CAAC,aAAa,yBAAyBf,EAAIgB,GAAIhB,EAAIa,OAAO,SAASI,EAAKC,GAAG,OAAOhB,EAAG,aAAa,CAACiB,IAAID,EAAEb,MAAM,CAAC,IAAMY,EAAKG,IAAI,KAAOH,QAAUf,EAAG,iBAAiB,CAACG,MAAM,CAAC,IAAK,UAAAC,OAAWN,EAAIO,OAAOC,MAAMC,IAAIC,YAAYC,WAAWC,YAAa,IAExeS,EAAkB,G,4GCuBtBC,EAAAC,EAAA,QAGe,GAFfA,EAAA,QAEe,CACfC,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51.1e3c46c9.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"ladging\"},[_c('loader-dynamic',{attrs:{\"src\":`header-${_vm.$store.state.app.activeGroup.publicPage.layout}`}}),(_vm.comps.length == 0)?_c('div',{staticStyle:{\"min-height\":\"calc(100vh - 408px)\"}}):_vm._l((_vm.comps),function(comp,i){return _c('loader-web',{key:i,attrs:{\"src\":comp.st1,\"comp\":comp}})}),_c('loader-dynamic',{attrs:{\"src\":`footer-${_vm.$store.state.app.activeGroup.publicPage.layout}`}})],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div class=\"ladging\">\n    <!-- <header-web /> -->\n    <loader-dynamic :src=\"`header-${$store.state.app.activeGroup.publicPage.layout}`\" />\n    <div v-if=\"comps.length == 0\" style=\"min-height: calc(100vh - 408px)\"></div>\n    <template v-else>\n      <loader-web\n        :src=\"comp.st1\"\n        :comp=\"comp\"\n        v-for=\"(comp, i) in comps\"\n        :key=\"i\"\n        \n      />\n      <!-- @on-show-task=\"showTask\"\n        @on-course-info=\"courseInfo\" -->\n    </template>\n    <loader-dynamic :src=\"`footer-${$store.state.app.activeGroup.publicPage.layout}`\" />\n  </div>\n</template>\n\n<script>\nimport AsyncLoadError from \"@/components/base/asyncLoadingError\";\nimport AsyncLoading from \"@/components/base/asyncLoading\";\n\nimport { request } from \"@/api/all\";\nvar _ = require(\"lodash\");\nconst moment = require(\"moment\");\n\nexport default {\n  components: {\n    loaderWeb: () => ({\n      component: import(\"@/views/shuffle/loader\"),\n      loading: AsyncLoading,\n      error: AsyncLoadError,\n      delay: 100,\n      timeout: 5000\n    }),\n    loaderDynamic: () => ({\n      component: import(\"@/views/shuffle/dynamic\"),\n      loading: AsyncLoading,\n      error: AsyncLoadError,\n      delay: 100,\n      timeout: 5000\n    })\n  },\n  data() {\n    return {\n      comps: [],\n      comp: {},\n      news: [],\n      modal: {\n        title: \"\",\n        task: {},\n        taskShow: false,\n        showCourse: false,\n        course: {},\n        courseInfos: []\n      },\n      locationHref: \"#\",\n      contactHref: \"#\"\n    };\n  },\n  mounted() {\n    if (this.$store.state.app.isMobile) {\n      this.$router.push({ name: \"login\" });\n    } \n    else this.init(this.$route.params.id);\n  },\n  methods: {\n    toggleBodyClass(addRemoveClass, className) {\n      const el = document.body;\n\n      if (addRemoveClass === \"addClass\") {\n        el.classList.add(className);\n      } else {\n        el.classList.remove(className);\n      }\n    },\n    init(pageId) {\n      //this.toggleBodyClass('removeClass', 'navbar-nav-show');\n\n      this.toggleBodyClass(\"addClass\", \"dynamic-locker\");\n      let _page = this.$store.state.app.pages.filter(x => x.id == pageId);\n      if (_page.length > 0) {\n        if (_page[0][\"locTypeCode\"] == \"single_content\") {\n          this.loadSingleContent(_page[0]);\n        } else if (_page[0][\"locTypeCode\"] == \"list_content\") {\n          this.loadListContent(_page[0]);\n        } else {\n          this.loadComponents(pageId);\n        }\n        document.title = _page[0].task;\n      }\n      this.initHeaderTop();\n    },\n    initHeaderTop() {\n      let _location = this.$store.state.app.pages.filter(\n        x => x.st1 == \"pageLocation\"\n      );\n      if (_location.length) {\n        this.locationHref = _location[0].id;\n      }\n\n      let _contact = this.$store.state.app.pages.filter(\n        x => x.st1 == \"pageContact\"\n      );\n      if (_contact.length) {\n        this.contactHref = _contact[0].id;\n      }\n    },\n    loadListContent(page) {\n      this.comps = [\n        {\n          st1: \"dynamic/title\",\n          task: page.task\n        },\n        {\n          st1: \"dynamic/loc-type-list\",\n          locTypeId1: page.locTypeId1\n        }\n      ];\n      this.toggleBodyClass(\"removeClass\", \"dynamic-locker\");\n    },\n    loadSingleContent(page) {\n      this.comps = [\n        // {\n        //   st1: \"dynamic/title\",\n        //   task: page.task\n        // },\n        {\n          st1: \"single-content\",\n          organizationTaskId: page.organizationTaskId\n        }\n      ];\n      this.toggleBodyClass(\"removeClass\", \"dynamic-locker\");\n    },\n    loadComponents(e) {\n      this.toggleBodyClass(\"addClass\", \"dynamic-locker\");\n      request({\n        api: { method: \"GET\", url: \"task/TaskInheritedDetail\" },\n        params: {\n          id: e\n        },\n        store: this.$store\n      }).then(res => {\n        this.toggleBodyClass(\"removeClass\", \"dynamic-locker\");\n        if (res != false) {\n          let compBox = res.data.task.b.filter(x => x.ot == 355);\n          if (compBox.length > 0) {\n            this.loadBox(compBox[0].id);\n          }\n        }\n      });\n    },\n    loadBox(boxId) {\n      request({\n        api: { method: \"GET\", url: \"task/boxInTaskList\" },\n        params: {\n          skip: 0,\n          size: 10,\n          id: boxId\n        },\n        store: this.$store\n      }).then(res => {\n        if (res != false) {\n          //console.log('res.data.tasks', res.data.tasks.filter(x=>x.ord>1000));\n          this.comps = _.sortBy(res.data.tasks.filter(x=>x.ord>1000), \"ord\", \"asc\");\n        }\n      });\n    }\n  },\n  watch: {\n    \"$root.$route\"(newRoute, oldRoute) {\n      if (newRoute.params.id != oldRoute.params.id) {\n        Object.assign(this.$data, this.$options.data());\n        this.$nextTick(() => {\n          this.init(newRoute.params.id);\n        });\n      }\n    }\n  }\n};\n</script>\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=4ec0d40c\"\nimport script from \"./index.vue?vue&type=script&lang=js\"\nexport * from \"./index.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}