|
|
@@ -1,30 +1,21 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <div class="filters-container">
|
|
|
- <el-button size="small" @click="$router.go(-1)">返回</el-button>
|
|
|
- <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
|
|
|
- <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
|
|
|
- </el-button>
|
|
|
- <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small" icon="el-icon-search" class="filter-item">高级查询
|
|
|
- </el-button>
|
|
|
- <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small" icon="el-icon-sort" class="filter-item">排序
|
|
|
- </el-button>
|
|
|
- <el-button @click="$router.push({path:'/arContent',query:{column:$route.query.column}})" type="primary" size="small" icon="el-icon-edit" class="filter-item">添加
|
|
|
- </el-button>
|
|
|
- <el-button @click="exportExcel" type="primary" size="small" icon="el-icon-share" class="filter-item">导出EXCEL
|
|
|
- </el-button>
|
|
|
- <el-dropdown trigger="click" size="medium" class="table-column-filter">
|
|
|
- <span>
|
|
|
- 筛选数据
|
|
|
- <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
- </span>
|
|
|
- <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
|
|
|
- <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
|
|
|
- </el-checkbox>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
- </div>
|
|
|
- <el-table :data="tableData" :height="tableHeight" row-key="id" ref="table">
|
|
|
+ <div>
|
|
|
+ <div class="filters-container">
|
|
|
+ <el-button size="small" @click="$router.go(-1)">返回</el-button>
|
|
|
+ <el-button @click="$router.push({path:'/arContent',query:{column:$route.query.column}})" type="primary" size="small" icon="el-icon-edit" class="filter-item">添加</el-button>
|
|
|
+
|
|
|
+ <el-dropdown trigger="click" size="medium" class="table-column-filter">
|
|
|
+ <span>
|
|
|
+ 筛选数据
|
|
|
+ <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
|
|
|
+ <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}</el-checkbox>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- <el-table :data="tableData" :height="tableHeight" row-key="id" ref="table">
|
|
|
<el-table-column v-if="multipleMode" align="center" type="selection" width="50">
|
|
|
</el-table-column>
|
|
|
<el-table-column type="index" min-width="50" align="center">
|
|
|
@@ -99,106 +90,200 @@
|
|
|
<el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- </el-table>
|
|
|
- <div class="pagination-wrapper">
|
|
|
- <div class="multiple-mode-wrapper" v-if="0">
|
|
|
- <el-button size="small" v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
|
|
|
- <el-button-group v-else>
|
|
|
- <el-button size="small" @click="operation1">批量操作1</el-button>
|
|
|
- <el-button size="small" @click="operation2">批量操作2</el-button>
|
|
|
- <el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
|
|
|
- </el-button-group>
|
|
|
- </div>
|
|
|
- <el-pagination background @size-change="pageSizeChange" @current-change="currentPageChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalNumber">
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
- <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
|
|
|
- <el-button @click="addField" type="text" icon="el-icon-plus">添加</el-button>
|
|
|
- <el-table :data="advancedQueryFields">
|
|
|
-
|
|
|
- <el-table-column prop="link" label="链接符" align="center">
|
|
|
- <template slot-scope="{row}">
|
|
|
- <el-select placeholder="链接" size="small" v-model="row.link" class="filter-item">
|
|
|
- <el-option label="AND" value="AND">
|
|
|
- </el-option>
|
|
|
- <el-option label="OR" value="OR">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="name" label="字段" align="center">
|
|
|
- <template slot-scope="{row}">
|
|
|
- <el-select v-model="row.name">
|
|
|
-
|
|
|
- <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
|
|
|
- <template slot-scope="{row}">
|
|
|
- <el-select v-model="row.searchMethod">
|
|
|
- <el-option v-for="item in searchMethods" :label="item" :value="item" :key="item"></el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="value" label="参数" align="center">
|
|
|
- <template slot-scope="{row}">
|
|
|
- <el-input v-model="row.value"></el-input>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="60" align="center">
|
|
|
- <template slot-scope="{ row, column, $index }">
|
|
|
- <el-button @click="removeField($index)" size="small" type="text">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
-
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
-
|
|
|
- <el-button @click="advancedQuery" :loading="$store.state.fetchingData">确定</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <el-dialog title="排序" :visible.sync="showTableSortDialog">
|
|
|
- <el-button @click="addSortField" type="text" icon="el-icon-plus">添加</el-button>
|
|
|
- <el-table :data="tableSortFields">
|
|
|
-
|
|
|
- <el-table-column prop="name" label="字段" align="center">
|
|
|
- <template slot-scope="{row}">
|
|
|
- <el-select v-model="row.name">
|
|
|
-
|
|
|
- <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="order" label="排序" align="center">
|
|
|
- <template slot-scope="{row}">
|
|
|
- <el-select v-model="row.order">
|
|
|
- <el-option label="降序" value="desc">
|
|
|
- </el-option>
|
|
|
- <el-option label="升序" value="asc">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="60" align="center">
|
|
|
- <template slot-scope="{ row, column, $index }">
|
|
|
- <el-button @click="removeSortField($index)" size="small" type="text">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
-
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
-
|
|
|
- <el-button @click="tableSortQuery" :loading="$store.state.fetchingData">确定</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <el-dialog title="查看图片" :visible.sync="imageDialogVisible" size="small">
|
|
|
- <img width="100%" :src="imgSrc" alt="">
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- </div>
|
|
|
+ </el-table>-->
|
|
|
+ <el-tabs type="border-card" :height="tableHeight" v-model="eltabsPane" style="max-width:1000px">
|
|
|
+ <el-tab-pane :key="(item.id).toString()" :name="(item.id).toString()" v-for="item in tableData">
|
|
|
+ <span slot="label">
|
|
|
+ {{getTitle(item.type)}}
|
|
|
+ <i class="el-icon-success" v-if="item.modifyFlag=='Y'" style="color:green"></i>
|
|
|
+ <i class="el-icon-warning" v-else style="color:red"></i>
|
|
|
+ </span>
|
|
|
+ <el-row :gutter="20" v-if="item.type=='1001'" type="flex" justify="space-between">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form ref="form" :model="item" label-width="80px">
|
|
|
+ <el-form-item label="店铺名称">
|
|
|
+ <el-input v-model="item.name"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="店铺图片">
|
|
|
+ <single-upload v-model="item.image"></single-upload>
|
|
|
+ <el-input v-model="item.image" placeholder="图片Url"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="店铺简介">
|
|
|
+ <el-input v-model="item.remark1"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="官网">
|
|
|
+ <el-input v-model="item.remark2"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-card shadow="never">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>{{item.name}}</span>
|
|
|
+ </div>
|
|
|
+ <el-row :gutter="50">
|
|
|
+ <el-col :span="12" class="img" :style="{backgroundImage:'url('+item.image+')'}"></el-col>
|
|
|
+ <el-col class="right" :span="10">
|
|
|
+ <div style="color:#666;font-size:14px;" :style="{textAlign:item.remark1?'left':'center'}">{{item.remark1?item.remark1:'请输入店铺简介'}}</div>
|
|
|
+ <el-button type="text" v-if="item.remark2" @click="$router.push(item.remark2)">点击进入官网</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row :gutter="20" v-else-if="item.type=='1002'" type="flex" justify="space-between">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form ref="form" :model="item" label-width="80px">
|
|
|
+ <el-form-item label="促销名称">
|
|
|
+ <el-input v-model="item.name"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="促销图片">
|
|
|
+ <single-upload v-model="item.image"></single-upload>
|
|
|
+ <el-input v-model="item.image" placeholder="图片Url"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="促销信息">
|
|
|
+ <el-input v-model="item.remark1"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="16">
|
|
|
+ <el-card shadow="never">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>{{item.name}}</span>
|
|
|
+ </div>
|
|
|
+ <el-row :gutter="50">
|
|
|
+ <el-col :span="12" class="img" :style="{backgroundImage:'url('+item.image+')'}"></el-col>
|
|
|
+ <el-col class="right" :span="10">
|
|
|
+ <div style="color:#666;font-size:14px;" :style="{textAlign:item.remark1?'left':'center'}">{{item.remark1?item.remark1:'请输入促销信息'}}</div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row :gutter="20" v-else-if="item.type=='1003'" type="flex" justify="space-between">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form ref="form" :model="item" label-width="80px">
|
|
|
+ <el-form-item label="模型名称">
|
|
|
+ <el-input v-model="item.name"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="模型说明">
|
|
|
+ <el-input v-model="item.remark1"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-row :gutter="20" v-else-if="item.type=='1004'" type="flex" justify="space-between">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form ref="form" :model="item" label-width="80px">
|
|
|
+ <el-form-item label="视频名称">
|
|
|
+ <el-input v-model="item.name"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="视频资源">
|
|
|
+ <el-upload class="upload-demo" :action="$baseUrl+'/assets/uploadFile'" :on-success="haleSuccess" :multiple="false" :file-list="fileList">
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
+ <div slot="tip" class="el-upload__tip">只能上传单个文件 ,且不超过500kb</div>
|
|
|
+ </el-upload>
|
|
|
+ <el-input v-model="item.movie" placeholder="视频Url"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" v-else type="flex" justify="space-between">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form ref="form" :model="item" label-width="80px">
|
|
|
+ <el-form-item label="普通模板名称">
|
|
|
+ <el-input v-model="item.name"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="普通模板说明">
|
|
|
+ <el-input v-model="item.remark1"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-button type="primary" style="margin:70px 0 0;float:right" plain size="small" @click="save">保存/下一步</el-button>
|
|
|
+ <el-button @click="deleteRow(item)" style="margin:70px 10px 0 0;float:right;" size="small" type="danger" plain>删除</el-button>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
|
|
|
+ <el-button @click="addField" type="text" icon="el-icon-plus">添加</el-button>
|
|
|
+ <el-table :data="advancedQueryFields">
|
|
|
+ <el-table-column prop="link" label="链接符" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-select placeholder="链接" size="small" v-model="row.link" class="filter-item">
|
|
|
+ <el-option label="AND" value="AND"></el-option>
|
|
|
+ <el-option label="OR" value="OR"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name" label="字段" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-select v-model="row.name">
|
|
|
+ <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-select v-model="row.searchMethod">
|
|
|
+ <el-option v-for="item in searchMethods" :label="item" :value="item" :key="item"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="value" label="参数" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-input v-model="row.value"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="60" align="center">
|
|
|
+ <template slot-scope="{ row, column, $index }">
|
|
|
+ <el-button @click="removeField($index)" size="small" type="text">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="advancedQuery" :loading="$store.state.fetchingData">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="排序" :visible.sync="showTableSortDialog">
|
|
|
+ <el-button @click="addSortField" type="text" icon="el-icon-plus">添加</el-button>
|
|
|
+ <el-table :data="tableSortFields">
|
|
|
+ <el-table-column prop="name" label="字段" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-select v-model="row.name">
|
|
|
+ <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value" :key="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="order" label="排序" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-select v-model="row.order">
|
|
|
+ <el-option label="降序" value="desc"></el-option>
|
|
|
+ <el-option label="升序" value="asc"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="60" align="center">
|
|
|
+ <template slot-scope="{ row, column, $index }">
|
|
|
+ <el-button @click="removeSortField($index)" size="small" type="text">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="tableSortQuery" :loading="$store.state.fetchingData">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="查看图片" :visible.sync="imageDialogVisible" size="small">
|
|
|
+ <img width="100%" :src="imgSrc" alt>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import { mapState } from 'vuex'
|
|
|
@@ -206,417 +291,502 @@ import { format } from 'date-fns'
|
|
|
import zh from 'date-fns/locale/zh_cn'
|
|
|
|
|
|
export default {
|
|
|
- created() {
|
|
|
- this.getData();
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- totalNumber: 0,
|
|
|
- totalPage: 10,
|
|
|
- currentPage: 1,
|
|
|
- pageSize: 20,
|
|
|
- tableData: [],
|
|
|
- filter1: '',
|
|
|
- filter2: '',
|
|
|
- tableColumns: [
|
|
|
- {
|
|
|
- label: 'ID',
|
|
|
- value: 'id',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '内容组ID',
|
|
|
- value: 'groupId',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '名称/描述',
|
|
|
- value: 'name',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '类别',
|
|
|
- value: 'type',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '文字',
|
|
|
- value: 'text',
|
|
|
- show: false
|
|
|
- },
|
|
|
- {
|
|
|
- label: '图片',
|
|
|
- value: 'image',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'URL',
|
|
|
- value: 'url',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '音频',
|
|
|
- value: 'voice',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '视频',
|
|
|
- value: 'movie',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '模型',
|
|
|
- value: 'model',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '文本文件',
|
|
|
- value: 'cfile',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '资源大小(M)',
|
|
|
- value: 'resourceSize',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注1',
|
|
|
- value: 'remark1',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注2',
|
|
|
- value: 'remark2',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注3',
|
|
|
- value: 'remark3',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注4',
|
|
|
- value: 'remark4',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注5',
|
|
|
- value: 'remark5',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注6',
|
|
|
- value: 'remark6',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注7',
|
|
|
- value: 'remark7',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注8',
|
|
|
- value: 'remark8',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注9',
|
|
|
- value: 'remark9',
|
|
|
- show: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注10',
|
|
|
- value: 'remark10',
|
|
|
- show: true
|
|
|
- },
|
|
|
- ],
|
|
|
- multipleMode: false,
|
|
|
- showAdvancedQueryDialog: false,
|
|
|
- advancedQueryFields: [],
|
|
|
- showTableSortDialog: false,
|
|
|
- tableSortFields: [],
|
|
|
- searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
|
|
|
- advancedQueryColumns: [
|
|
|
- {
|
|
|
- label: 'ID',
|
|
|
- value: 'id'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '内容组ID',
|
|
|
- value: 'group_id'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '名称/描述',
|
|
|
- value: 'name'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '类别',
|
|
|
- value: 'type'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '文字',
|
|
|
- value: 'text'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '图片',
|
|
|
- value: 'image'
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'URL',
|
|
|
- value: 'url'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '音频',
|
|
|
- value: 'voice'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '视频',
|
|
|
- value: 'movie'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '模型',
|
|
|
- value: 'model'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '文本文件',
|
|
|
- value: 'cfile'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '资源大小(M)',
|
|
|
- value: 'resource_size'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注1',
|
|
|
- value: 'remark1'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注2',
|
|
|
- value: 'remark2'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注3',
|
|
|
- value: 'remark3'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注4',
|
|
|
- value: 'remark4'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注5',
|
|
|
- value: 'remark5'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注6',
|
|
|
- value: 'remark6'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注7',
|
|
|
- value: 'remark7',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注8',
|
|
|
- value: 'remark8',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注9',
|
|
|
- value: 'remark9',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '备注10',
|
|
|
- value: 'remark10',
|
|
|
- },
|
|
|
- ],
|
|
|
- advancedQuerySearchKey: '',
|
|
|
- orderByStr: '',
|
|
|
- imgSrc: '',
|
|
|
- imageDialogVisible: false,
|
|
|
+ created() {
|
|
|
+ this.getData(0);
|
|
|
+ this.$http.get({
|
|
|
+ url: '/arContentType/all',
|
|
|
+ data: {}
|
|
|
+ }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.arContentType = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ arContentType: [],
|
|
|
+ totalNumber: 0,
|
|
|
+ totalPage: 10,
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ tableData: [],
|
|
|
+ filter1: '',
|
|
|
+ filter2: '',
|
|
|
+ tableColumns: [
|
|
|
+ {
|
|
|
+ label: 'ID',
|
|
|
+ value: 'id',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '内容组ID',
|
|
|
+ value: 'groupId',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '名称/描述',
|
|
|
+ value: 'name',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '类别',
|
|
|
+ value: 'type',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '文字',
|
|
|
+ value: 'text',
|
|
|
+ show: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '图片',
|
|
|
+ value: 'image',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'URL',
|
|
|
+ value: 'url',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '音频',
|
|
|
+ value: 'voice',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '视频',
|
|
|
+ value: 'movie',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '模型',
|
|
|
+ value: 'model',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '文本文件',
|
|
|
+ value: 'cfile',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '资源大小(M)',
|
|
|
+ value: 'resourceSize',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注1',
|
|
|
+ value: 'remark1',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注2',
|
|
|
+ value: 'remark2',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注3',
|
|
|
+ value: 'remark3',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注4',
|
|
|
+ value: 'remark4',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注5',
|
|
|
+ value: 'remark5',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注6',
|
|
|
+ value: 'remark6',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注7',
|
|
|
+ value: 'remark7',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注8',
|
|
|
+ value: 'remark8',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注9',
|
|
|
+ value: 'remark9',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注10',
|
|
|
+ value: 'remark10',
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ multipleMode: false,
|
|
|
+ showAdvancedQueryDialog: false,
|
|
|
+ advancedQueryFields: [],
|
|
|
+ showTableSortDialog: false,
|
|
|
+ tableSortFields: [],
|
|
|
+ searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
|
|
|
+ advancedQueryColumns: [
|
|
|
+ {
|
|
|
+ label: 'ID',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '内容组ID',
|
|
|
+ value: 'group_id'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '名称/描述',
|
|
|
+ value: 'name'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '类别',
|
|
|
+ value: 'type'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '文字',
|
|
|
+ value: 'text'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '图片',
|
|
|
+ value: 'image'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'URL',
|
|
|
+ value: 'url'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '音频',
|
|
|
+ value: 'voice'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '视频',
|
|
|
+ value: 'movie'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '模型',
|
|
|
+ value: 'model'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '文本文件',
|
|
|
+ value: 'cfile'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '资源大小(M)',
|
|
|
+ value: 'resource_size'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注1',
|
|
|
+ value: 'remark1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注2',
|
|
|
+ value: 'remark2'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注3',
|
|
|
+ value: 'remark3'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注4',
|
|
|
+ value: 'remark4'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注5',
|
|
|
+ value: 'remark5'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注6',
|
|
|
+ value: 'remark6'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注7',
|
|
|
+ value: 'remark7',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注8',
|
|
|
+ value: 'remark8',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注9',
|
|
|
+ value: 'remark9',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注10',
|
|
|
+ value: 'remark10',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ advancedQuerySearchKey: '',
|
|
|
+ orderByStr: '',
|
|
|
+ imgSrc: '',
|
|
|
+ imageDialogVisible: false,
|
|
|
+ eltabsPane: '',
|
|
|
+ fileList: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['tableHeight']),
|
|
|
+ selection() {
|
|
|
+ return this.$refs.table.selection.map(i => i.id);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getTitle(type) {
|
|
|
+ var name = '其他'
|
|
|
+ this.arContentType.forEach(item => {
|
|
|
+ if (item.id == Number(type)) {
|
|
|
+ name = item.typeName
|
|
|
}
|
|
|
+ })
|
|
|
+ return name
|
|
|
},
|
|
|
- computed: {
|
|
|
- ...mapState(['tableHeight']),
|
|
|
- selection() {
|
|
|
- return this.$refs.table.selection.map(i => i.id);
|
|
|
- }
|
|
|
+ pageSizeChange(size) {
|
|
|
+ this.currentPage = 1;
|
|
|
+ this.pageSize = size;
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ currentPageChange(page) {
|
|
|
+ this.currentPage = page;
|
|
|
+ this.getData();
|
|
|
},
|
|
|
- methods: {
|
|
|
- pageSizeChange(size) {
|
|
|
- this.currentPage = 1;
|
|
|
- this.pageSize = size;
|
|
|
- this.getData();
|
|
|
- },
|
|
|
- currentPageChange(page) {
|
|
|
- this.currentPage = page;
|
|
|
- this.getData();
|
|
|
- },
|
|
|
- getData() {
|
|
|
-
|
|
|
- var data = {
|
|
|
- currentPage: this.currentPage,
|
|
|
- pageNumber: this.pageSize,
|
|
|
- searchKey: this.filter1,
|
|
|
- advancedQuery: this.advancedQuerySearchKey,
|
|
|
- orderByStr: this.orderByStr,
|
|
|
+ getData(index) {
|
|
|
+
|
|
|
+ var data = {
|
|
|
+ currentPage: this.currentPage,
|
|
|
+ pageNumber: this.pageSize,
|
|
|
+ searchKey: this.filter1,
|
|
|
+ advancedQuery: this.advancedQuerySearchKey,
|
|
|
+ orderByStr: this.orderByStr,
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.$route.query.column) {
|
|
|
+ var tempColumn = this.$route.query.column;
|
|
|
+ data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$http.get({
|
|
|
+ url: '/arContent/page',
|
|
|
+ data: data
|
|
|
+ }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ res.data.pp.forEach(item => {
|
|
|
+ if (item.type == '1004' && item.movie) {
|
|
|
+ this.fileList = [item.movie]
|
|
|
}
|
|
|
-
|
|
|
- if (this.$route.query.column) {
|
|
|
- var tempColumn = this.$route.query.column;
|
|
|
- data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
|
|
|
+ })
|
|
|
+ this.totalNumber = res.data.page.totalNumber;
|
|
|
+ this.tableData = res.data.pp;
|
|
|
+ if (index || index == 0) {
|
|
|
+ if (res.data.pp.length > index) {
|
|
|
+ this.eltabsPane = res.data.pp[index].id.toString()
|
|
|
}
|
|
|
|
|
|
- this.$http.get({
|
|
|
- url: '/arContent/page',
|
|
|
- data: data
|
|
|
- }).then(res => {
|
|
|
- if (res.success) {
|
|
|
- this.totalNumber = res.data.page.totalNumber;
|
|
|
- this.tableData = res.data.pp;
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- isColumnShow(column) {
|
|
|
- var row = this.tableColumns.find(i => i.value === column);
|
|
|
- return row ? row.show : false;
|
|
|
- },
|
|
|
- toggleMultipleMode(multipleMode) {
|
|
|
- this.multipleMode = multipleMode;
|
|
|
- if (!multipleMode) {
|
|
|
- this.$refs.table.clearSelection();
|
|
|
- }
|
|
|
- },
|
|
|
- editRow(row) {
|
|
|
- this.$router.push({
|
|
|
- path: '/arContent',
|
|
|
- query: {
|
|
|
- id: row.id,
|
|
|
- column: this.$route.query.column,
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- operation1() {
|
|
|
- this.$notify({
|
|
|
- title: '提示',
|
|
|
- message: this.selection
|
|
|
- });
|
|
|
- },
|
|
|
- operation2() {
|
|
|
- this.$message('操作2');
|
|
|
- },
|
|
|
- addField() {
|
|
|
- this.advancedQueryFields.push({
|
|
|
- link: 'AND',
|
|
|
- name: '',
|
|
|
- searchMethod: '=',
|
|
|
- value: '',
|
|
|
- });
|
|
|
- },
|
|
|
- removeField(i) {
|
|
|
- if (this.advancedQueryFields.length > 0) {
|
|
|
- this.advancedQueryFields.splice(i, 1);
|
|
|
- }
|
|
|
- },
|
|
|
- advancedQuery() {
|
|
|
+ }
|
|
|
|
|
|
- this.advancedQuerySearchKey = '';
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ isColumnShow(column) {
|
|
|
+ var row = this.tableColumns.find(i => i.value === column);
|
|
|
+ return row ? row.show : false;
|
|
|
+ },
|
|
|
+ toggleMultipleMode(multipleMode) {
|
|
|
+ this.multipleMode = multipleMode;
|
|
|
+ if (!multipleMode) {
|
|
|
+ this.$refs.table.clearSelection();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ editRow(row) {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/arContent',
|
|
|
+ query: {
|
|
|
+ id: row.id,
|
|
|
+ column: this.$route.query.column,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ operation1() {
|
|
|
+ this.$notify({
|
|
|
+ title: '提示',
|
|
|
+ message: this.selection
|
|
|
+ });
|
|
|
+ },
|
|
|
+ operation2() {
|
|
|
+ this.$message('操作2');
|
|
|
+ },
|
|
|
+ addField() {
|
|
|
+ this.advancedQueryFields.push({
|
|
|
+ link: 'AND',
|
|
|
+ name: '',
|
|
|
+ searchMethod: '=',
|
|
|
+ value: '',
|
|
|
+ });
|
|
|
+ },
|
|
|
+ removeField(i) {
|
|
|
+ if (this.advancedQueryFields.length > 0) {
|
|
|
+ this.advancedQueryFields.splice(i, 1);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ advancedQuery() {
|
|
|
|
|
|
- if (this.advancedQueryFields.length > 0) {
|
|
|
+ this.advancedQuerySearchKey = '';
|
|
|
|
|
|
- var templist = [];
|
|
|
+ if (this.advancedQueryFields.length > 0) {
|
|
|
|
|
|
- this.advancedQueryFields.forEach(item => {
|
|
|
- if (item.link && item.name && item.searchMethod && item.value) {
|
|
|
- var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
|
|
|
- templist.push(tempItem);
|
|
|
- }
|
|
|
- })
|
|
|
+ var templist = [];
|
|
|
|
|
|
- if (templist.length > 0) {
|
|
|
+ this.advancedQueryFields.forEach(item => {
|
|
|
+ if (item.link && item.name && item.searchMethod && item.value) {
|
|
|
+ var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
|
|
|
+ templist.push(tempItem);
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
- this.advancedQuerySearchKey = templist.join('_;');
|
|
|
- }
|
|
|
- }
|
|
|
+ if (templist.length > 0) {
|
|
|
|
|
|
- this.getData();
|
|
|
- this.showAdvancedQueryDialog = false;
|
|
|
- },
|
|
|
- addSortField() {
|
|
|
- this.tableSortFields.push({
|
|
|
- name: '',
|
|
|
- order: 'asc',
|
|
|
- });
|
|
|
- },
|
|
|
- removeSortField(i) {
|
|
|
- if (this.tableSortFields.length > 0) {
|
|
|
- this.tableSortFields.splice(i, 1);
|
|
|
- }
|
|
|
- },
|
|
|
- tableSortQuery() {
|
|
|
+ this.advancedQuerySearchKey = templist.join('_;');
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- this.orderByStr = '';
|
|
|
+ this.getData();
|
|
|
+ this.showAdvancedQueryDialog = false;
|
|
|
+ },
|
|
|
+ addSortField() {
|
|
|
+ this.tableSortFields.push({
|
|
|
+ name: '',
|
|
|
+ order: 'asc',
|
|
|
+ });
|
|
|
+ },
|
|
|
+ removeSortField(i) {
|
|
|
+ if (this.tableSortFields.length > 0) {
|
|
|
+ this.tableSortFields.splice(i, 1);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ tableSortQuery() {
|
|
|
|
|
|
- if (this.tableSortFields.length > 0) {
|
|
|
+ this.orderByStr = '';
|
|
|
|
|
|
- var templist = [];
|
|
|
+ if (this.tableSortFields.length > 0) {
|
|
|
|
|
|
- this.tableSortFields.forEach(item => {
|
|
|
- if (item.name && item.order) {
|
|
|
- var tempItem = item.name + '_,' + item.order;
|
|
|
- templist.push(tempItem);
|
|
|
- }
|
|
|
- })
|
|
|
+ var templist = [];
|
|
|
|
|
|
- if (templist.length > 0) {
|
|
|
+ this.tableSortFields.forEach(item => {
|
|
|
+ if (item.name && item.order) {
|
|
|
+ var tempItem = item.name + '_,' + item.order;
|
|
|
+ templist.push(tempItem);
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
- this.orderByStr = templist.join('_;');
|
|
|
- }
|
|
|
- }
|
|
|
+ if (templist.length > 0) {
|
|
|
|
|
|
- this.getData();
|
|
|
- this.showTableSortDialog = false;
|
|
|
- },
|
|
|
- exportExcel() {
|
|
|
- window.location.href = this.$baseUrl + "/arContent/exportExcel?searchKey="
|
|
|
- + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
|
|
|
- },
|
|
|
- searchData() {
|
|
|
- this.currentPage = 1;
|
|
|
- this.getData();
|
|
|
- },
|
|
|
- deleteRow(row) {
|
|
|
- this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
|
|
|
- return this.$http.post({
|
|
|
- url: '/arContent/del',
|
|
|
- data: { id: row.id }
|
|
|
- })
|
|
|
- }).then(() => {
|
|
|
- this.$message.success('删除成功');
|
|
|
- this.getData();
|
|
|
- }).catch(action => {
|
|
|
- if (action === 'cancel') {
|
|
|
- this.$message.info('删除取消');
|
|
|
- } else {
|
|
|
- this.$message.error('删除失败');
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- DateTimeFormatter(row, column, cellValue) {
|
|
|
- if (cellValue) {
|
|
|
- return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
|
|
|
- }
|
|
|
+ this.orderByStr = templist.join('_;');
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- },
|
|
|
- DateFormatter(row, column, cellValue) {
|
|
|
- if (cellValue) {
|
|
|
- return format(cellValue, 'YYYY/MM/DD', { locale: zh })
|
|
|
- }
|
|
|
+ this.getData();
|
|
|
+ this.showTableSortDialog = false;
|
|
|
+ },
|
|
|
+ exportExcel() {
|
|
|
+ window.location.href = this.$baseUrl + "/arContent/exportExcel?searchKey="
|
|
|
+ + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
|
|
|
+ },
|
|
|
+ searchData() {
|
|
|
+ this.currentPage = 1;
|
|
|
+ this.getData();
|
|
|
+ },
|
|
|
+ deleteRow(row) {
|
|
|
+ this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
|
|
|
+ return this.$http.post({
|
|
|
+ url: '/arContent/del',
|
|
|
+ data: { id: row.id }
|
|
|
+ })
|
|
|
+ }).then(() => {
|
|
|
+ this.$message.success('删除成功');
|
|
|
+ this.getData(0);
|
|
|
+ }).catch(action => {
|
|
|
+ if (action === 'cancel') {
|
|
|
+ this.$message.info('删除取消');
|
|
|
+ } else {
|
|
|
+ this.$message.error('删除失败');
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ DateTimeFormatter(row, column, cellValue) {
|
|
|
+ if (cellValue) {
|
|
|
+ return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
|
|
|
+ }
|
|
|
|
|
|
- },
|
|
|
- showImg(img) {
|
|
|
- this.imgSrc = img;
|
|
|
- this.imageDialogVisible = true;
|
|
|
- },
|
|
|
+ },
|
|
|
+ DateFormatter(row, column, cellValue) {
|
|
|
+ if (cellValue) {
|
|
|
+ return format(cellValue, 'YYYY/MM/DD', { locale: zh })
|
|
|
+ }
|
|
|
|
|
|
+ },
|
|
|
+ showImg(img) {
|
|
|
+ this.imgSrc = img;
|
|
|
+ this.imageDialogVisible = true;
|
|
|
+ },
|
|
|
+ haleSuccess(file) {
|
|
|
+ //console.log(file)
|
|
|
+ file.data.forEach(item => {
|
|
|
+ var nameList = item.split('/')
|
|
|
+ var jsonp = {
|
|
|
+ name: nameList[nameList.length - 1],
|
|
|
+ url: item
|
|
|
+ }
|
|
|
+ this.fileList.splice(0, 1, jsonp)
|
|
|
+ var list = [...this.tableData]
|
|
|
+ list.forEach(todo => {
|
|
|
+ if (todo.type == '1004') {
|
|
|
+ todo.movie = item
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tableData = list
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ save() {
|
|
|
+ var list = [...this.tableData]
|
|
|
+ list.forEach((item, index) => {
|
|
|
+ if (item.id.toString() == this.eltabsPane) {
|
|
|
+ if (!item.name) {
|
|
|
+ this.$message.warning('请填写名称!');
|
|
|
+ return
|
|
|
+ }
|
|
|
+ item.modifyFlag = 'Y'
|
|
|
+ this.$http.post({
|
|
|
+ url: '/arContent/update',
|
|
|
+ data: item
|
|
|
+ }).then(() => {
|
|
|
+ this.$message.success('保存成功');
|
|
|
+ this.getData(index + 1);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
+.img {
|
|
|
+ height: 300px;
|
|
|
+ background-size: cover;
|
|
|
+ background-position: center center;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-color: #ccc;
|
|
|
+ margin-left: 20px;
|
|
|
+ border-radius: 4px;
|
|
|
+}
|
|
|
+.right {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ flex-direction: column;
|
|
|
+ align-self: stretch;
|
|
|
+}
|
|
|
</style>
|