|
@@ -0,0 +1,161 @@
|
|
|
+<!-- -->
|
|
|
+<template>
|
|
|
+<div class='con' v-loading.fullscreen.lock="loading">
|
|
|
+ <div class="h-body">
|
|
|
+ <div class="h-header">
|
|
|
+ <span>场景码:</span>
|
|
|
+ <el-input style="margin-right:10px;" v-model="inpuKey" placeholder="请输入场景码"></el-input>
|
|
|
+ <el-button type="primary" @click="save">下载</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
|
|
+// 例如:import 《组件名称》 from '《组件路径》';
|
|
|
+import vcenter from '@/components/vcenter'
|
|
|
+
|
|
|
+export default {
|
|
|
+ // import引入的组件需要注入到对象中才能使用
|
|
|
+ components: {
|
|
|
+ vcenter
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ // 这里存放数据
|
|
|
+ return {
|
|
|
+ inpuKey: '',
|
|
|
+ loading: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 监听属性 类似于data概念
|
|
|
+ computed: {
|
|
|
+ token () {
|
|
|
+ return window.localStorage.getItem('zfb_token')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 监控data中的数据变化
|
|
|
+ watch: {
|
|
|
+ activeTagId () {
|
|
|
+ this.refresh()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 方法集合
|
|
|
+ methods: {
|
|
|
+
|
|
|
+ save () {
|
|
|
+ if (!this.inpuKey) {
|
|
|
+ return this.$notify.error({
|
|
|
+ title: '错误',
|
|
|
+ message: '请输入场景码'
|
|
|
+ })
|
|
|
+ // https://admin.zhifangbao.com/scene/downloadSceneData?sceneNum=zhZGWVrnO4
|
|
|
+ }
|
|
|
+ this.loading = true
|
|
|
+ this.$http({
|
|
|
+ method: 'get',
|
|
|
+ url: `/scene/downloadSceneData?sceneNum=${this.inpuKey}`,
|
|
|
+ headers: {
|
|
|
+ token: this.token
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ this.loading = false
|
|
|
+ if (res.code === 200) {
|
|
|
+ window.open(`/${res.message}`, '_blank')
|
|
|
+ } else {
|
|
|
+ return this.$alert(res.message, '提示', {
|
|
|
+ confirmButtonText: '确定'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.con {
|
|
|
+ .d-l {
|
|
|
+ display: inline-block;
|
|
|
+ width: 100%;
|
|
|
+ .zfb-upload {
|
|
|
+ width: 180px;
|
|
|
+ height: 130px;
|
|
|
+ line-height: 130px;
|
|
|
+ overflow: hidden;
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 178px;
|
|
|
+ height: 128px;
|
|
|
+ border-radius: 6px;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:hover{
|
|
|
+ border-color: #409eff;
|
|
|
+ .v-mask{
|
|
|
+ display: inline-block;
|
|
|
+ width: 178px;
|
|
|
+ height: 128px;
|
|
|
+ border-radius: 6px;
|
|
|
+ background: rgba(0,0,0,0.5);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-icon-plus {
|
|
|
+ position: relative;
|
|
|
+ top: -15px;
|
|
|
+ font-size: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .h-body {
|
|
|
+ width: 100%;
|
|
|
+ padding: 20px;
|
|
|
+ box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.1);
|
|
|
+ border-radius: 3px;
|
|
|
+ background-color: #fff;
|
|
|
+ .h-header{
|
|
|
+ width: 50%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+ >span{
|
|
|
+ display: inline-block;
|
|
|
+ min-width: 70px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .span-tag {
|
|
|
+ display: inline-block;
|
|
|
+ padding-right: 8px;
|
|
|
+ font-size: 18px;
|
|
|
+
|
|
|
+ .t-span {
|
|
|
+ cursor: pointer;
|
|
|
+ padding-right: 3px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .t-active {
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .c-table {
|
|
|
+ overflow: auto;
|
|
|
+ height: 670px;
|
|
|
+ margin-top: 60px;
|
|
|
+ .o-span {
|
|
|
+ color: #0175dc;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ .p-con {
|
|
|
+ width: 100%;
|
|
|
+ text-align: right;
|
|
|
+ padding: 25px 20px 30px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|