|
@@ -4,26 +4,23 @@
|
|
<div class="filter-container">
|
|
<div class="filter-container">
|
|
<span>标题:</span>
|
|
<span>标题:</span>
|
|
<el-input
|
|
<el-input
|
|
- v-model="listQuery.articleTitle"
|
|
|
|
|
|
+ v-model="listQuery.fileTitle"
|
|
placeholder="标题"
|
|
placeholder="标题"
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
class="filter-item"
|
|
class="filter-item"
|
|
@keyup.enter.native="getList"
|
|
@keyup.enter.native="getList"
|
|
/>
|
|
/>
|
|
<span>所属模块:</span>
|
|
<span>所属模块:</span>
|
|
- <el-select
|
|
|
|
- v-model="listQuery.auditStatus"
|
|
|
|
|
|
+
|
|
|
|
+ <el-cascader
|
|
|
|
+ v-model="listQuery.fileModule"
|
|
|
|
+ :options="modules"
|
|
|
|
+ class="filter-item"
|
|
placeholder="所属模块"
|
|
placeholder="所属模块"
|
|
|
|
+ style="margin-rigth: 15px"
|
|
clearable
|
|
clearable
|
|
- style="width: 200px"
|
|
|
|
- class="filter-item"
|
|
|
|
@change="getList"
|
|
@change="getList"
|
|
- >
|
|
|
|
- <el-option label="全部" value="" />
|
|
|
|
- <el-option label="待审核" :value="2" />
|
|
|
|
- <el-option label="审核通过" :value="1" />
|
|
|
|
- <el-option label="审核未通过" :value="0" />
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ />
|
|
<el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
|
|
<el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
|
|
<el-button
|
|
<el-button
|
|
v-if="userIdentity === 1"
|
|
v-if="userIdentity === 1"
|
|
@@ -43,68 +40,81 @@
|
|
highlight-current-row
|
|
highlight-current-row
|
|
cell-class-name="table-cell"
|
|
cell-class-name="table-cell"
|
|
>
|
|
>
|
|
- <el-table-column label="序号" :index="indexMethod" type="index" width="80" align="center" />
|
|
|
|
- <el-table-column label="标题" prop="articleTitle" align="center" />
|
|
|
|
- <el-table-column label="所属模块" align="center" />
|
|
|
|
- <el-table-column label="创建时间" width="240px" align="center">
|
|
|
|
- <template slot-scope="{ row }">
|
|
|
|
- {{ row.createTime | formatTime }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="操作" width="240px" align="center">
|
|
|
|
- <template slot-scope="{ row }">
|
|
|
|
- <template v-if="userIdentity === 1">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ v-loading="listLoading"
|
|
|
|
+ :data="list"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ border
|
|
|
|
+ fit
|
|
|
|
+ highlight-current-row
|
|
|
|
+ cell-class-name="table-cell"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column label="序号" :index="indexMethod" type="index" width="80" align="center" />
|
|
|
|
+ <el-table-column label="标题" prop="fileTitle" align="center" />
|
|
|
|
+ <el-table-column label="所属模块" align="center" prop="fileModuleType" />
|
|
|
|
+ <el-table-column label="创建时间" width="240px" align="center">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ {{ row.createTime | formatTime }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="userIdentity === 1"
|
|
type="primary"
|
|
type="primary"
|
|
size="mini"
|
|
size="mini"
|
|
style="margin-right:5px"
|
|
style="margin-right:5px"
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
|
|
+ @click="handleEditFile(row)"
|
|
>编辑</el-button>
|
|
>编辑</el-button>
|
|
|
|
+
|
|
<el-button
|
|
<el-button
|
|
|
|
+ type="success"
|
|
|
|
+ size="mini"
|
|
|
|
+ style="margin-right:5px"
|
|
|
|
+ icon="el-icon-document"
|
|
|
|
+ @click="handlePreview(row)"
|
|
|
|
+ >查看</el-button>
|
|
|
|
+
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="userIdentity === 1"
|
|
type="danger"
|
|
type="danger"
|
|
size="mini"
|
|
size="mini"
|
|
style="margin-right:5px"
|
|
style="margin-right:5px"
|
|
icon="el-icon-s-check"
|
|
icon="el-icon-s-check"
|
|
@click="handleRemove(row)"
|
|
@click="handleRemove(row)"
|
|
>删除</el-button>
|
|
>删除</el-button>
|
|
|
|
+
|
|
</template>
|
|
</template>
|
|
- <el-button
|
|
|
|
- type="danger"
|
|
|
|
- size="mini"
|
|
|
|
- style="margin-right:5px"
|
|
|
|
- icon="el-icon-s-check"
|
|
|
|
- @click="handleRemove(row)"
|
|
|
|
- >播放</el-button>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table-column></el-table>
|
|
<!-- 表格区域END -->
|
|
<!-- 表格区域END -->
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList(listQuery)" />
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList(listQuery)" />
|
|
|
|
|
|
- <!-- dialog Start -->
|
|
|
|
|
|
+ <!-- 文档编辑dialog -->
|
|
<el-dialog
|
|
<el-dialog
|
|
- title="添加视频"
|
|
|
|
- :visible.sync="dialogVisible"
|
|
|
|
|
|
+ title="添加文档"
|
|
|
|
+ :visible="dialogVisible"
|
|
width="30%"
|
|
width="30%"
|
|
@close="dialogClose"
|
|
@close="dialogClose"
|
|
>
|
|
>
|
|
|
|
|
|
<el-form ref="dialogForm" :model="dialogFormData" label-width="86px" :rules="rules">
|
|
<el-form ref="dialogForm" :model="dialogFormData" label-width="86px" :rules="rules">
|
|
- <el-form-item label="标题:" prop="title">
|
|
|
|
- <el-input v-model="dialogFormData.title" placeholder="请输入标题" />
|
|
|
|
|
|
+ <el-form-item label="标题:" prop="fileTitle">
|
|
|
|
+ <el-input v-model="dialogFormData.fileTitle" placeholder="请输入标题" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="视频路径:" prop="videoUrl">
|
|
|
|
- <file-upload ref="fileUpload" :file-list="uploadFileList" accept-type="application/*" @change="fileUploadChange" />
|
|
|
|
- <el-input v-show="false" v-model="dialogFormData.videoUrl" />
|
|
|
|
|
|
+ <el-form-item label="文档路径:" prop="fileUrl">
|
|
|
|
+ <file-upload ref="fileUpload" :file-list="uploadFileList" accept-type=".doc,.docx" @change="fileUploadChange" />
|
|
|
|
+ <el-input v-show="false" v-model="dialogFormData.fileUrl" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="所属模块:" prop="belongMoudule">
|
|
|
|
- <el-select v-model="dialogFormData.belongMoudule">
|
|
|
|
- <el-option label="请选择模块" value="" />
|
|
|
|
- <el-option label="供应商管理/供应商列表" :value="1" />
|
|
|
|
- <el-option label="供应商管理/供应商列表" :value="2" />
|
|
|
|
- <el-option label="供应商管理/供应商列表" :value="3" />
|
|
|
|
- <el-option label="供应商管理/供应商列表" :value="4" />
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <el-form-item label="所属模块:" prop="fileModule">
|
|
|
|
+ <el-cascader
|
|
|
|
+ v-if="dialogVisible"
|
|
|
|
+ v-model="dialogFormData.fileModule"
|
|
|
|
+ :options="modules"
|
|
|
|
+ placeholder="所属模块"
|
|
|
|
+ clearable
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -112,16 +122,18 @@
|
|
<el-button type="primary" :disabled="!saveBtnClickable" :loading="requestLoading" @click="submitUpload">确 定</el-button>
|
|
<el-button type="primary" :disabled="!saveBtnClickable" :loading="requestLoading" @click="submitUpload">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
- <!-- dialog END -->
|
|
|
|
|
|
+ <!-- 文档编辑dialog END -->
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import FileUpload from '@/components/FileUpload'
|
|
import FileUpload from '@/components/FileUpload'
|
|
import Pagination from '@/components/Pagination' // secondary package based on el-pagination
|
|
import Pagination from '@/components/Pagination' // secondary package based on el-pagination
|
|
|
|
+import openWindow from '@/utils/open-window'
|
|
import { formatDate } from '@/utils'
|
|
import { formatDate } from '@/utils'
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
-import { changeArticleStatus, getArticleList, removeArticle } from '@/api/doc'
|
|
|
|
|
|
+import { fetchCourseList, saveCourse, removeCourse } from '@/api/helper'
|
|
|
|
+import { getToutesTree, getModuleType } from '@/utils/formatRoutesToModule'
|
|
import { debounce } from '@/utils/tools'
|
|
import { debounce } from '@/utils/tools'
|
|
export default {
|
|
export default {
|
|
components: { Pagination, FileUpload },
|
|
components: { Pagination, FileUpload },
|
|
@@ -133,6 +145,7 @@ export default {
|
|
return formatDate(time, 'yyyy-MM-DD HH:mm:ss')
|
|
return formatDate(time, 'yyyy-MM-DD HH:mm:ss')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
listLoading: false,
|
|
listLoading: false,
|
|
@@ -140,33 +153,28 @@ export default {
|
|
requestLoading: false,
|
|
requestLoading: false,
|
|
total: 0,
|
|
total: 0,
|
|
listQuery: {
|
|
listQuery: {
|
|
- authUserId: '', // 机构id
|
|
|
|
- auditStatus: '', // 审核状态
|
|
|
|
- articleTitle: '', // 文章标题
|
|
|
|
- listType: 1, // 列表类型:1文章列表,2文章审核列表
|
|
|
|
- pageNum: 1, // 页码
|
|
|
|
- pageSize: 10, // 分页大小
|
|
|
|
- status: '' // 文章状态:0已下线,1已上线,2待上线
|
|
|
|
|
|
+ fileType: 2, // 文件类型:1视频,2文档
|
|
|
|
+ fileTitle: '', // 文件标题
|
|
|
|
+ fileModule: [], // 文件模块:1品牌授权-授权列表,2机构管理-机构列表
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10
|
|
},
|
|
},
|
|
|
|
+ modules: [],
|
|
list: [],
|
|
list: [],
|
|
uploadFileList: [],
|
|
uploadFileList: [],
|
|
- dialogFormData: {
|
|
|
|
- title: '',
|
|
|
|
- videoUrl: '',
|
|
|
|
- belongMoudule: ''
|
|
|
|
- },
|
|
|
|
|
|
+ dialogFormData: {},
|
|
rules: {
|
|
rules: {
|
|
- title: [{
|
|
|
|
|
|
+ fileTitle: [{
|
|
required: true,
|
|
required: true,
|
|
message: '请输入标题', trigger: ['change', 'blur']
|
|
message: '请输入标题', trigger: ['change', 'blur']
|
|
}],
|
|
}],
|
|
- videoUrl: [
|
|
|
|
|
|
+ fileUrl: [
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
message: '请选择文件', trigger: 'change'
|
|
message: '请选择文件', trigger: 'change'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- belongMoudule: [{
|
|
|
|
|
|
+ fileModule: [{
|
|
required: true,
|
|
required: true,
|
|
message: '请选择所属模块', trigger: 'change'
|
|
message: '请选择所属模块', trigger: 'change'
|
|
}]
|
|
}]
|
|
@@ -174,22 +182,46 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters(['authUserId', 'userIdentity', 'proxyInfo']),
|
|
|
|
|
|
+ ...mapGetters(['authUserId', 'userIdentity', 'proxyInfo', 'routes']),
|
|
saveBtnClickable() {
|
|
saveBtnClickable() {
|
|
return this.uploadFileList.length > 0
|
|
return this.uploadFileList.length > 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+ this.dialogFormData = this.resetDialogFormData()
|
|
|
|
+ this.modules = getToutesTree(this.routes)
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 初始化dialog formdata
|
|
|
|
+ resetDialogFormData() {
|
|
|
|
+ return {
|
|
|
|
+ fileTitle: '',
|
|
|
|
+ fileUrl: '',
|
|
|
|
+ fileId: '',
|
|
|
|
+ fileName: '',
|
|
|
|
+ fileType: 2,
|
|
|
|
+ fileModule: []
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
// 上传文件
|
|
// 上传文件
|
|
submitUpload() {
|
|
submitUpload() {
|
|
|
|
+ if (this.userIdentity !== 1) return
|
|
this.$refs.dialogForm.validate(valid => {
|
|
this.$refs.dialogForm.validate(valid => {
|
|
console.log(valid)
|
|
console.log(valid)
|
|
if (!valid) return
|
|
if (!valid) return
|
|
- this.requestLoading = true // 上传文件
|
|
|
|
- this.$refs.fileUpload.submit()
|
|
|
|
|
|
+ this.requestLoading = true // 上传文件 保存 loading
|
|
|
|
+
|
|
|
|
+ const uploadFile = this.uploadFileList[0]
|
|
|
|
+ // 文件如果已上传 直接保存
|
|
|
|
+ if (uploadFile && uploadFile.status === 'success') {
|
|
|
|
+ this.handleSave()
|
|
|
|
+ } else {
|
|
|
|
+ // 上传文件
|
|
|
|
+ this.$refs.fileUpload.submit()
|
|
|
|
+ }
|
|
|
|
+ console.log(this.uploadFileList)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 监听上传文件的状态变化
|
|
// 监听上传文件的状态变化
|
|
@@ -204,42 +236,79 @@ export default {
|
|
},
|
|
},
|
|
// 保存 TODO
|
|
// 保存 TODO
|
|
handleSave: debounce(function() {
|
|
handleSave: debounce(function() {
|
|
- console.log('保存')
|
|
|
|
- console.log(this.dialogFormData)
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
|
+ if (this.userIdentity !== 1) return
|
|
|
|
+ const params = {
|
|
|
|
+ fileId: this.dialogFormData.fileId || '',
|
|
|
|
+ fileTitle: this.dialogFormData.fileTitle,
|
|
|
|
+ fileName: this.dialogFormData.fileName,
|
|
|
|
+ ossName: this.dialogFormData.fileUrl,
|
|
|
|
+ fileType: this.dialogFormData.fileType,
|
|
|
|
+ fileModule: this.dialogFormData.fileModule.join('-')
|
|
|
|
+ }
|
|
|
|
+ saveCourse(params).then(res => {
|
|
|
|
+ this.$message.success(res.data)
|
|
|
|
+ this.dialogVisible = false
|
|
|
|
+ this.getList()
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ console.log(err)
|
|
|
|
+ }).finally(() => {
|
|
this.requestLoading = false
|
|
this.requestLoading = false
|
|
- }, 500)
|
|
|
|
|
|
+ })
|
|
}, 200),
|
|
}, 200),
|
|
|
|
|
|
// 处理文件上传状态
|
|
// 处理文件上传状态
|
|
handleFileUploadStatus(fileList) {
|
|
handleFileUploadStatus(fileList) {
|
|
// 文件列表为空
|
|
// 文件列表为空
|
|
if (fileList.length <= 0) {
|
|
if (fileList.length <= 0) {
|
|
- this.dialogFormData.videoUrl = ''
|
|
|
|
|
|
+ this.dialogFormData.fileUrl = ''
|
|
return Promise.reject('faild')
|
|
return Promise.reject('faild')
|
|
}
|
|
}
|
|
// 取第一个文件
|
|
// 取第一个文件
|
|
const { response, status } = fileList[0]
|
|
const { response, status } = fileList[0]
|
|
// 文件已选择但未上传
|
|
// 文件已选择但未上传
|
|
if (status === 'ready') {
|
|
if (status === 'ready') {
|
|
- this.dialogFormData.videoUrl = status
|
|
|
|
|
|
+ this.dialogFormData.fileUrl = status
|
|
return Promise.reject('faild')
|
|
return Promise.reject('faild')
|
|
}
|
|
}
|
|
// 文件已上传
|
|
// 文件已上传
|
|
if (status === 'success') {
|
|
if (status === 'success') {
|
|
- this.dialogFormData.videoUrl = response.previewUrl
|
|
|
|
|
|
+ this.dialogFormData.fileUrl = response.downloadUrl
|
|
|
|
+ this.dialogFormData.fileName = response.fileName
|
|
return Promise.resolve('success')
|
|
return Promise.resolve('success')
|
|
}
|
|
}
|
|
|
|
+ console.log(response)
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 数据回显 修改
|
|
|
|
+ handleEditFile(row) {
|
|
|
|
+ if (this.userIdentity !== 1) return
|
|
|
|
+ const fileModule = row.fileModule.split('-')
|
|
|
|
+ const i = parseInt(fileModule[0])
|
|
|
|
+ const j = parseInt(fileModule[1])
|
|
|
|
+ // dialog 表单数据
|
|
|
|
+ this.dialogFormData.fileTitle = row.fileTitle
|
|
|
|
+ this.dialogFormData.fileUrl = row.ossName
|
|
|
|
+ this.dialogFormData.fileId = row.fileId
|
|
|
|
+ this.dialogFormData.fileName = row.fileName
|
|
|
|
+ this.dialogFormData.fileType = 2
|
|
|
|
+ this.dialogFormData.fileModule = [i, j]
|
|
|
|
+ // 文件回显列表
|
|
|
|
+ this.uploadFileList = [{ url: row.fileUrl, name: row.fileName }]
|
|
|
|
+ this.dialogVisible = true
|
|
},
|
|
},
|
|
|
|
+
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
getList() {
|
|
getList() {
|
|
this.listLoading = true
|
|
this.listLoading = true
|
|
- this.listQuery.authUserId = this.authUserId
|
|
|
|
- getArticleList(this.listQuery)
|
|
|
|
|
|
+ const params = {
|
|
|
|
+ ...this.listQuery,
|
|
|
|
+ authUserId: this.authUserId,
|
|
|
|
+ fileModule: this.listQuery.fileModule.join('-')
|
|
|
|
+ }
|
|
|
|
+ fetchCourseList(params)
|
|
.then(res => {
|
|
.then(res => {
|
|
if (res.code !== 0) return
|
|
if (res.code !== 0) return
|
|
- this.list = res.data.list
|
|
|
|
- console.log(res)
|
|
|
|
|
|
+ this.list = this.formatFileModuleType(res.data.list)
|
|
this.total = res.data.total
|
|
this.total = res.data.total
|
|
})
|
|
})
|
|
.finally(() => {
|
|
.finally(() => {
|
|
@@ -248,7 +317,8 @@ export default {
|
|
},
|
|
},
|
|
// 删除
|
|
// 删除
|
|
async handleRemove(row) {
|
|
async handleRemove(row) {
|
|
- const text = await this.$confirm('确认删除该文章吗?', '提示', {
|
|
|
|
|
|
+ if (this.userIdentity !== 1) return
|
|
|
|
+ const text = await this.$confirm('确认删除该帮助文档吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
@@ -256,50 +326,38 @@ export default {
|
|
this.$message.info('已取消操作')
|
|
this.$message.info('已取消操作')
|
|
})
|
|
})
|
|
if (text !== 'confirm') return
|
|
if (text !== 'confirm') return
|
|
- removeArticle({ articleId: row.articleId })
|
|
|
|
|
|
+ removeCourse({ fileId: row.fileId })
|
|
.then(res => {
|
|
.then(res => {
|
|
if (res.code !== 0) return
|
|
if (res.code !== 0) return
|
|
this.$message.success(res.data)
|
|
this.$message.success(res.data)
|
|
this.getList(this.listQuery)
|
|
this.getList(this.listQuery)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 状态改变
|
|
|
|
- handleChangeStatus(item) {
|
|
|
|
- this.listLoading = true
|
|
|
|
- // const params = {
|
|
|
|
- // authId: item.authId,
|
|
|
|
- // status: item.status ? 1 : 0
|
|
|
|
- // }
|
|
|
|
- console.log(item)
|
|
|
|
- const params = {
|
|
|
|
- articleId: item.articleId,
|
|
|
|
- status: item.status === 1 ? 0 : 1
|
|
|
|
- }
|
|
|
|
- changeArticleStatus(params).then(res => {
|
|
|
|
- // this.$message.success(res.data)
|
|
|
|
- this.$message({
|
|
|
|
- message: res.data,
|
|
|
|
- duration: 500,
|
|
|
|
- type: 'success'
|
|
|
|
- })
|
|
|
|
- this.getList()
|
|
|
|
- }).catch(err => {
|
|
|
|
- console.log(err)
|
|
|
|
- }).finally(() => {
|
|
|
|
- this.listLoading = false
|
|
|
|
|
|
+
|
|
|
|
+ // 预览
|
|
|
|
+ handlePreview(row) {
|
|
|
|
+ openWindow(row.fileUrl, '', `${row.fileModuleType}-教程`, 800, 460)
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 关闭添加对话框
|
|
|
|
+ dialogClose() {
|
|
|
|
+ this.uploadFileList = []
|
|
|
|
+ this.$refs.fileUpload.clearAllFiles()
|
|
|
|
+ this.$refs.dialogForm.resetFields()
|
|
|
|
+
|
|
|
|
+ this.dialogFormData = this.resetDialogFormData()
|
|
|
|
+ this.dialogVisible = false
|
|
|
|
+ },
|
|
|
|
+ // 获取模块文本
|
|
|
|
+ formatFileModuleType(list) {
|
|
|
|
+ return list.filter(item => {
|
|
|
|
+ item.fileModuleType = getModuleType(item.fileModule)
|
|
|
|
+ return item.fileModuleType !== ''
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 表格索引
|
|
// 表格索引
|
|
indexMethod(index) {
|
|
indexMethod(index) {
|
|
return index + this.listQuery.pageSize * (this.listQuery.pageNum - 1) + 1
|
|
return index + this.listQuery.pageSize * (this.listQuery.pageNum - 1) + 1
|
|
- },
|
|
|
|
- // 编辑视频
|
|
|
|
- handleAdd() {},
|
|
|
|
- dialogClose() {
|
|
|
|
- console.log(123)
|
|
|
|
- // this.uploadFileList = []
|
|
|
|
- this.$refs.fileUpload.clearAllFiles()
|
|
|
|
- this.$refs.dialogForm.resetFields()
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -330,4 +388,12 @@ export default {
|
|
.el-badge {
|
|
.el-badge {
|
|
margin: 0 6px;
|
|
margin: 0 6px;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.el-cascader{
|
|
|
|
+&.filter-item{
|
|
|
|
+margin: 0 15px 10px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
</style>
|
|
</style>
|