|
@@ -0,0 +1,681 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <i-page-header :title="pageTitle"></i-page-header>
|
|
|
+ <Card :bordered="false" dis-hover class="ivu-mt">
|
|
|
+ <el-form ref="formData" :model="form" label-width="120px">
|
|
|
+ <el-form-item label="课程标题" prop="course_topic" :rules="[{ required: true, message: '请输入课程标题'}]">
|
|
|
+ <el-input placeholder="请输入课程标题" autocomplete="off" v-model="form.course_topic"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="封面图片" prop="course_cover" :rules="[{ required: true, message: '请上传封面图片'}]">
|
|
|
+ <ui-upload :upUrl="upUrl" :img="form.course_cover" fileName="封面图片" :headers="upHeaders"
|
|
|
+ :updata="{isz:0,code:'img'}" @onUpload="onUpload"></ui-upload>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课程简介" prop="course_speaker_intro" :rules="[{ required: true, message: '请输入课程简介'}]">
|
|
|
+ <el-input placeholder="请输入课程简介" autocomplete="off" v-model="form.course_speaker_intro"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课程分类" prop="course_cate_id" :rules="[{ required: true, message: '请选择课程分类'}]">
|
|
|
+ <el-cascader v-model="form.course_cate_id" :options="options" @change="handleChange"
|
|
|
+ :show-all-levels="false" style="width: 100%;"></el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课程分组" prop="gr_id" :rules="[{ required: true, message: '请选择课程分组'}]">
|
|
|
+ <el-cascader v-model="form.gr_id" :options="options" @change="handleChange" :show-all-levels="false"
|
|
|
+ style="width: 100%;"></el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="排序" prop="sort" :rules="[{ required: true, message: '请输入课程排序'}]">
|
|
|
+ <el-input placeholder="请输入课程标题" autocomplete="off" v-model="form.sort"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="价格" prop="course_price" :rules="[{ required: true, message: '请输入价格'}]">
|
|
|
+ <el-input placeholder="请输入价格" autocomplete="off" v-model="form.course_price"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="认证价格" prop="course_price_2" :rules="[{ required: true, message: '请输入价格'}]">
|
|
|
+ <el-input placeholder="请输入价格" autocomplete="off" v-model="form.course_price_2"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="二次认证价格" prop="course_price_3" :rules="[{ required: true, message: '请输入价格'}]">
|
|
|
+ <el-input placeholder="请输入价格" autocomplete="off" v-model="form.course_price_3"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="积分最多抵扣" prop="deduct" :rules="[{ required: true, message: '请输入抵扣数量'}]">
|
|
|
+ <el-input placeholder="请输入抵扣数量" autocomplete="off" v-model="form.deduct"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="从业人员专用" prop="course_only_for_employee"
|
|
|
+ :rules="[{ required: true, message: '请选择是否从业人员专用'}]">
|
|
|
+ <el-radio v-model="form.course_only_for_employee" label="0">否</el-radio>
|
|
|
+ <el-radio v-model="form.course_only_for_employee" label="1">是</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="生成线下核销码" prop="make_code" :rules="[{ required: true, message: '请选择是否生成线下核销码'}]">
|
|
|
+ <el-radio v-model="form.make_code" label="0">否</el-radio>
|
|
|
+ <el-radio v-model="form.make_code" label="1">是</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- parent_course -->
|
|
|
+ <el-form-item label="前置课程" prop="parent_course">
|
|
|
+ <!-- <div style="display: flex;"> -->
|
|
|
+ <el-input placeholder="请选择前置课程(留空即为无条件)" autocomplete="off" v-model="form.course_price"
|
|
|
+ disabled></el-input>
|
|
|
+ <el-button type="primary" style="margin-top: 10px;">选择前置课程</el-button>
|
|
|
+ <!-- </div> -->
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="积分商城广告" prop="ad_pid">
|
|
|
+ <el-select v-model="form.ad_pid" placeholder="请选择" style="width: 100%;">
|
|
|
+ <el-option v-for="item in optionss" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课程介绍" prop="course_intro" :rules="[{ required: true, message: '请输入课程介绍'}]">
|
|
|
+ <Toolbar style="border: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" />
|
|
|
+ <!-- 编辑器 -->
|
|
|
+ <Editor style="height: 400px; overflow-y: hidden;border: 1px solid #ccc;"
|
|
|
+ :defaultConfig="editorConfig" v-model="form.course_intro" @onChange="onChange"
|
|
|
+ @onCreated="onCreated" />
|
|
|
+ </el-form-item>
|
|
|
+ <!-- audio_file -->
|
|
|
+ <el-form-item label="课程文件" prop="audio_file" :rules="[{ required: true, message: '请输入课程介绍'}]">
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ drag
|
|
|
+ :action="upUrl"
|
|
|
+ :multiple="false"
|
|
|
+ :headers="upHeaders"
|
|
|
+ :data="{isz:0,code:'files'}"
|
|
|
+ :before-upload="beforeUpload"
|
|
|
+ >
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
+ <div class="el-upload__tip" slot="tip">只能上传mp3文件</div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课程视频" prop="audio_file" :rules="[{ required: true, message: '请输入课程视频'}]">
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ drag
|
|
|
+ :action="upUrl"
|
|
|
+ multiple
|
|
|
+ :before-upload="beforeUpload4"
|
|
|
+ :headers="upHeaders"
|
|
|
+ :data="{isz:0,code:'files'}"
|
|
|
+ >
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
+ <div class="el-upload__tip" slot="tip">只能上传mp4文件</div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="tapOk(1)">{{form.id ? '修改提交': '保存发布'}}</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ </Card>
|
|
|
+ </div>
|
|
|
+
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import UiUpload from "@/ui/upload/index";
|
|
|
+ import {
|
|
|
+ DomEditor
|
|
|
+ } from '@wangeditor/editor'
|
|
|
+ import {
|
|
|
+ Editor,
|
|
|
+ Toolbar
|
|
|
+ } from '@wangeditor/editor-for-vue'
|
|
|
+ import Setting from "@/setting";
|
|
|
+ import axios from 'axios'
|
|
|
+ import IPageHeader from "../../../layouts/system/page-header/index";
|
|
|
+ import {
|
|
|
+ SystemInfoAuditItem,
|
|
|
+ SystemInfoAuditSub
|
|
|
+ } from "../../../api/system/audit";
|
|
|
+ import {
|
|
|
+ upLoad
|
|
|
+ } from '../../../api/system/sys'
|
|
|
+ import {
|
|
|
+ SystemAddArt,
|
|
|
+ updateArticle,
|
|
|
+ SystemArtDetail,
|
|
|
+ SystemGetArtList,
|
|
|
+ getArtDetail
|
|
|
+ } from "../../../api/system/adver";
|
|
|
+ import UiLoading from "../../../ui/loading/index";
|
|
|
+ import {
|
|
|
+ base64to2
|
|
|
+ } from '../../../utils/comm.js'
|
|
|
+ export default {
|
|
|
+ name: "SystemInfoAuditItem",
|
|
|
+ components: {
|
|
|
+ UiLoading,
|
|
|
+ IPageHeader,
|
|
|
+ Editor,
|
|
|
+ Toolbar,
|
|
|
+ UiUpload
|
|
|
+ },
|
|
|
+ computed: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ editor: null,
|
|
|
+
|
|
|
+ toolbarConfig: {
|
|
|
+ // toolbarKeys: [ /* 显示哪些菜单,如何排序、分组 */ ],
|
|
|
+ excludeKeys: ['group-video', 'emotion', 'fullScreen'],
|
|
|
+ },
|
|
|
+ editorConfig: {
|
|
|
+ placeholder: "请输入内容...",
|
|
|
+ // autoFocus: false,
|
|
|
+
|
|
|
+ // 所有的菜单配置,都要在 MENU_CONF 属性下
|
|
|
+ MENU_CONF: {
|
|
|
+ uploadImage: {
|
|
|
+ base64LimitSize: 1024 * 1024 * 10
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ content: '',
|
|
|
+ form: {
|
|
|
+ content: '',
|
|
|
+ title: '',
|
|
|
+ id: '',
|
|
|
+ course_cover: ''
|
|
|
+ },
|
|
|
+ pageTitle: '课程详情',
|
|
|
+ upHeaders: {},
|
|
|
+ formActiveName: "tab_base",
|
|
|
+ formData: {
|
|
|
+ id: ""
|
|
|
+ },
|
|
|
+ title: "",
|
|
|
+ dialogVisible: false,
|
|
|
+ upUrl: '',
|
|
|
+ optionss: [{
|
|
|
+ value: '选项1',
|
|
|
+ label: '黄金糕'
|
|
|
+ }, {
|
|
|
+ value: '选项2',
|
|
|
+ label: '双皮奶'
|
|
|
+ }, {
|
|
|
+ value: '选项3',
|
|
|
+ label: '蚵仔煎'
|
|
|
+ }, {
|
|
|
+ value: '选项4',
|
|
|
+ label: '龙须面'
|
|
|
+ }, {
|
|
|
+ value: '选项5',
|
|
|
+ label: '北京烤鸭'
|
|
|
+ }],
|
|
|
+ options: [{
|
|
|
+ value: 'zhinan',
|
|
|
+ label: '指南',
|
|
|
+ children: [{
|
|
|
+ value: 'shejiyuanze',
|
|
|
+ label: '设计原则',
|
|
|
+ children: [{
|
|
|
+ value: 'yizhi',
|
|
|
+ label: '一致'
|
|
|
+ }, {
|
|
|
+ value: 'fankui',
|
|
|
+ label: '反馈'
|
|
|
+ }, {
|
|
|
+ value: 'xiaolv',
|
|
|
+ label: '效率'
|
|
|
+ }, {
|
|
|
+ value: 'kekong',
|
|
|
+ label: '可控'
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ value: 'daohang',
|
|
|
+ label: '导航',
|
|
|
+ children: [{
|
|
|
+ value: 'cexiangdaohang',
|
|
|
+ label: '侧向导航'
|
|
|
+ }, {
|
|
|
+ value: 'dingbudaohang',
|
|
|
+ label: '顶部导航'
|
|
|
+ }]
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ value: 'zujian',
|
|
|
+ label: '组件',
|
|
|
+ children: [{
|
|
|
+ value: 'basic',
|
|
|
+ label: 'Basic',
|
|
|
+ children: [{
|
|
|
+ value: 'layout',
|
|
|
+ label: 'Layout 布局'
|
|
|
+ }, {
|
|
|
+ value: 'color',
|
|
|
+ label: 'Color 色彩'
|
|
|
+ }, {
|
|
|
+ value: 'typography',
|
|
|
+ label: 'Typography 字体'
|
|
|
+ }, {
|
|
|
+ value: 'icon',
|
|
|
+ label: 'Icon 图标'
|
|
|
+ }, {
|
|
|
+ value: 'button',
|
|
|
+ label: 'Button 按钮'
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ value: 'form',
|
|
|
+ label: 'Form',
|
|
|
+ children: [{
|
|
|
+ value: 'radio',
|
|
|
+ label: 'Radio 单选框'
|
|
|
+ }, {
|
|
|
+ value: 'checkbox',
|
|
|
+ label: 'Checkbox 多选框'
|
|
|
+ }, {
|
|
|
+ value: 'input',
|
|
|
+ label: 'Input 输入框'
|
|
|
+ }, {
|
|
|
+ value: 'input-number',
|
|
|
+ label: 'InputNumber 计数器'
|
|
|
+ }, {
|
|
|
+ value: 'select',
|
|
|
+ label: 'Select 选择器'
|
|
|
+ }, {
|
|
|
+ value: 'cascader',
|
|
|
+ label: 'Cascader 级联选择器'
|
|
|
+ }, {
|
|
|
+ value: 'switch',
|
|
|
+ label: 'Switch 开关'
|
|
|
+ }, {
|
|
|
+ value: 'slider',
|
|
|
+ label: 'Slider 滑块'
|
|
|
+ }, {
|
|
|
+ value: 'time-picker',
|
|
|
+ label: 'TimePicker 时间选择器'
|
|
|
+ }, {
|
|
|
+ value: 'date-picker',
|
|
|
+ label: 'DatePicker 日期选择器'
|
|
|
+ }, {
|
|
|
+ value: 'datetime-picker',
|
|
|
+ label: 'DateTimePicker 日期时间选择器'
|
|
|
+ }, {
|
|
|
+ value: 'upload',
|
|
|
+ label: 'Upload 上传'
|
|
|
+ }, {
|
|
|
+ value: 'rate',
|
|
|
+ label: 'Rate 评分'
|
|
|
+ }, {
|
|
|
+ value: 'form',
|
|
|
+ label: 'Form 表单'
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ value: 'data',
|
|
|
+ label: 'Data',
|
|
|
+ children: [{
|
|
|
+ value: 'table',
|
|
|
+ label: 'Table 表格'
|
|
|
+ }, {
|
|
|
+ value: 'tag',
|
|
|
+ label: 'Tag 标签'
|
|
|
+ }, {
|
|
|
+ value: 'progress',
|
|
|
+ label: 'Progress 进度条'
|
|
|
+ }, {
|
|
|
+ value: 'tree',
|
|
|
+ label: 'Tree 树形控件'
|
|
|
+ }, {
|
|
|
+ value: 'pagination',
|
|
|
+ label: 'Pagination 分页'
|
|
|
+ }, {
|
|
|
+ value: 'badge',
|
|
|
+ label: 'Badge 标记'
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ value: 'notice',
|
|
|
+ label: 'Notice',
|
|
|
+ children: [{
|
|
|
+ value: 'alert',
|
|
|
+ label: 'Alert 警告'
|
|
|
+ }, {
|
|
|
+ value: 'loading',
|
|
|
+ label: 'Loading 加载'
|
|
|
+ }, {
|
|
|
+ value: 'message',
|
|
|
+ label: 'Message 消息提示'
|
|
|
+ }, {
|
|
|
+ value: 'message-box',
|
|
|
+ label: 'MessageBox 弹框'
|
|
|
+ }, {
|
|
|
+ value: 'notification',
|
|
|
+ label: 'Notification 通知'
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ value: 'navigation',
|
|
|
+ label: 'Navigation',
|
|
|
+ children: [{
|
|
|
+ value: 'menu',
|
|
|
+ label: 'NavMenu 导航菜单'
|
|
|
+ }, {
|
|
|
+ value: 'tabs',
|
|
|
+ label: 'Tabs 标签页'
|
|
|
+ }, {
|
|
|
+ value: 'breadcrumb',
|
|
|
+ label: 'Breadcrumb 面包屑'
|
|
|
+ }, {
|
|
|
+ value: 'dropdown',
|
|
|
+ label: 'Dropdown 下拉菜单'
|
|
|
+ }, {
|
|
|
+ value: 'steps',
|
|
|
+ label: 'Steps 步骤条'
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ value: 'others',
|
|
|
+ label: 'Others',
|
|
|
+ children: [{
|
|
|
+ value: 'dialog',
|
|
|
+ label: 'Dialog 对话框'
|
|
|
+ }, {
|
|
|
+ value: 'tooltip',
|
|
|
+ label: 'Tooltip 文字提示'
|
|
|
+ }, {
|
|
|
+ value: 'popover',
|
|
|
+ label: 'Popover 弹出框'
|
|
|
+ }, {
|
|
|
+ value: 'card',
|
|
|
+ label: 'Card 卡片'
|
|
|
+ }, {
|
|
|
+ value: 'carousel',
|
|
|
+ label: 'Carousel 走马灯'
|
|
|
+ }, {
|
|
|
+ value: 'collapse',
|
|
|
+ label: 'Collapse 折叠面板'
|
|
|
+ }]
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ value: 'ziyuan',
|
|
|
+ label: '资源',
|
|
|
+ children: [{
|
|
|
+ value: 'axure',
|
|
|
+ label: 'Axure Components'
|
|
|
+ }, {
|
|
|
+ value: 'sketch',
|
|
|
+ label: 'Sketch Templates'
|
|
|
+ }, {
|
|
|
+ value: 'jiaohu',
|
|
|
+ label: '组件交互文档'
|
|
|
+ }]
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ if (this.$route.query.title) {
|
|
|
+ this.pageTitle = this.$route.query.title;
|
|
|
+ }
|
|
|
+ if (this.$route.query.id) {
|
|
|
+ this.form.id = parseInt(this.$route.query.id);
|
|
|
+ }
|
|
|
+ this.initView();
|
|
|
+
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ beforeUpload4(file) {
|
|
|
+ console.log(file);
|
|
|
+ if(file.type == 'video/mp4') {
|
|
|
+ return file
|
|
|
+ }else {
|
|
|
+ this.$alert("只支持上传mp4文件", '系统提示');
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeUpload(file) {
|
|
|
+ console.log(file);
|
|
|
+ if(file.type == 'audio/mpeg') {
|
|
|
+ return file
|
|
|
+ }else {
|
|
|
+ this.$alert("只支持上传mp3文件", '系统提示');
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 上传文件
|
|
|
+ * @param res
|
|
|
+ */
|
|
|
+ onUpload: function(res) {
|
|
|
+ if (res.code == -1) {
|
|
|
+ Notice.error({
|
|
|
+ title: "系统提示",
|
|
|
+ content: res.msg
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.form.course_cover = res.data.img;
|
|
|
+ console.log(this.form.course_cover, 'this.form.course_cover');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onUploads(res) {
|
|
|
+ if (res.code == -1) {
|
|
|
+ Notice.error({
|
|
|
+ title: "系统提示",
|
|
|
+ content: res.msg
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ // this.form.course_cover = res.data.img;
|
|
|
+ // console.log(this.form.course_cover, 'this.form.course_cover');
|
|
|
+ console.log(res);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleChange() {
|
|
|
+
|
|
|
+ },
|
|
|
+ onCreated(editor) {
|
|
|
+ this.editor = Object.seal(editor); // 【注意】一定要用 Object.seal() 否则会报错
|
|
|
+ console.log(this.editor.getMenuConfig());
|
|
|
+
|
|
|
+ },
|
|
|
+ onChange(editor) {
|
|
|
+ // console.log("onChange", editor.getHtml()); // onChange 时获取编辑器最新内容
|
|
|
+ },
|
|
|
+ getEditorText() {
|
|
|
+ const editor = this.editor;
|
|
|
+ if (editor == null) return;
|
|
|
+
|
|
|
+ console.log(editor.getText()); // 执行 editor API
|
|
|
+ },
|
|
|
+ printEditorHtml() {
|
|
|
+ const editor = this.editor;
|
|
|
+ if (editor == null) return;
|
|
|
+
|
|
|
+ console.log(editor.getHtml()); // 执行 editor API
|
|
|
+ },
|
|
|
+ initView: function() {
|
|
|
+ var upHeaders = {};
|
|
|
+ this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
|
|
|
+ const token = this.$utils.util.cookies.get('system_token');
|
|
|
+ if (token) {
|
|
|
+ upHeaders['SYSTEM-ACC-TOKEN'] = token;
|
|
|
+ }
|
|
|
+ this.upHeaders = upHeaders;
|
|
|
+ if (this.form.id) {
|
|
|
+ this.getData();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getData: function() {
|
|
|
+ let that = this
|
|
|
+ var post = {};
|
|
|
+ const token = this.$utils.util.cookies.get('system_token');
|
|
|
+ console.log(token);
|
|
|
+ console.log(axios);
|
|
|
+ this.$utils.loading(this, "loading..");
|
|
|
+ post.id = this.form.id;
|
|
|
+ let loading = this.$loading('获取数据中..');
|
|
|
+ // SystemArtDetail({},1).then(res => {
|
|
|
+ // loading.close();
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.data = res.data;
|
|
|
+ // } else {
|
|
|
+ // this.$alert(res.msg, '系统提示');
|
|
|
+ // }
|
|
|
+ // }).catch(err => {
|
|
|
+ // loading.close();
|
|
|
+ // this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
|
|
|
+ // });
|
|
|
+
|
|
|
+ try {
|
|
|
+ getArtDetail({
|
|
|
+ id: post.id
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res.data.list[0]);
|
|
|
+ let data = res.data.list[0]
|
|
|
+ this.form.title = data.title
|
|
|
+ // that.$set(that.form,title,)
|
|
|
+ this.form.content = data.content
|
|
|
+ loading.close();
|
|
|
+ }).catch(err => {
|
|
|
+ loading.close();
|
|
|
+ console.log(err, 'sss');
|
|
|
+ });
|
|
|
+ } catch (e) {
|
|
|
+ //TODO handle the exception
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 确认审核通过
|
|
|
+ */
|
|
|
+ tapOk: function(type) {
|
|
|
+ // this.form.id = this.data.id;
|
|
|
+ // this.title = "审核通过";
|
|
|
+ // this.form.mono = '';
|
|
|
+ // this.form.type = type;
|
|
|
+ // this.dialogVisible = true;
|
|
|
+ // console.log(this.content);
|
|
|
+ let that = this
|
|
|
+ if (this.form.id) {
|
|
|
+ updateArticle({
|
|
|
+ id: that.form.id,
|
|
|
+ title: that.form.title,
|
|
|
+ content: that.form.content
|
|
|
+ }).then(res => {
|
|
|
+ this.$Message.success("修改成功");
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ SystemAddArt({
|
|
|
+ title: that.form.title,
|
|
|
+ content: that.form.content
|
|
|
+ }).then(res => {
|
|
|
+ this.$Message.success("发布成功");
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ tapQr: function(type) {
|
|
|
+ // this.form.id = this.data.id;
|
|
|
+ // this.title = "审核拒绝";
|
|
|
+ // this.form.mono = '';
|
|
|
+ // this.form.type = type;
|
|
|
+ // this.dialogVisible = true;
|
|
|
+ this.$router.push('/')
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * !提交 !
|
|
|
+ */
|
|
|
+ auditSub: function() {
|
|
|
+ let loading = this.$loading('提交数据中..');
|
|
|
+ SystemInfoAuditSub({
|
|
|
+ mono: this.form.mono,
|
|
|
+ id: this.form.id,
|
|
|
+ type: this.form.type,
|
|
|
+ }).then(res => {
|
|
|
+ loading.close();
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.initView();
|
|
|
+ } else {
|
|
|
+ this.$alert(res.msg, '系统提示');
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ this.isLoad = false;
|
|
|
+ this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style src="@wangeditor/editor/dist/css/style.css"></style>
|
|
|
+<style scoped>
|
|
|
+ @import "~vue2-editor/dist/vue2-editor.css";
|
|
|
+
|
|
|
+ /* Import the Quill styles you want */
|
|
|
+ @import '~quill/dist/quill.core.css';
|
|
|
+ @import '~quill/dist/quill.bubble.css';
|
|
|
+ @import '~quill/dist/quill.snow.css';
|
|
|
+
|
|
|
+ iframe.videoIframe {
|
|
|
+ border: 0px;
|
|
|
+ padding: 0px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-dialog__body {
|
|
|
+ padding: 0px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-dialog__body iframe body {
|
|
|
+ padding: 0px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .muser-tab-continer {
|
|
|
+ border: 1px solid #EEEEEE
|
|
|
+ }
|
|
|
+
|
|
|
+ a.muser-tab-a {
|
|
|
+ display: inline-block;
|
|
|
+ padding: 0px 28px;
|
|
|
+ height: 42px;
|
|
|
+ line-height: 42px;
|
|
|
+ border-bottom: 3px solid transparent;
|
|
|
+ font-size: 17px;
|
|
|
+ color: #595959;
|
|
|
+ }
|
|
|
+
|
|
|
+ a.muser-tab-a.active {
|
|
|
+ border-bottom: 3px solid #EA312B;
|
|
|
+ color: #EA312B
|
|
|
+ }
|
|
|
+
|
|
|
+ .upimg-item {
|
|
|
+ width: 82px;
|
|
|
+ height: 82px;
|
|
|
+ margin-right: 12px;
|
|
|
+ overflow: hidden;
|
|
|
+ float: left;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ position: relative;
|
|
|
+ border: 1px solid grey;
|
|
|
+ }
|
|
|
+
|
|
|
+ .upimg-item img {
|
|
|
+ width: 82px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ .img-remove-btn {
|
|
|
+ position: absolute;
|
|
|
+ top: 0px;
|
|
|
+ right: 0px;
|
|
|
+ font-size: 24px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .upvideo-item {
|
|
|
+ width: 300px;
|
|
|
+ margin-right: 5px;
|
|
|
+ overflow: hidden;
|
|
|
+ float: left;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ position: relative;
|
|
|
+ padding-right: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .upvideo-item video {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .upvideo-item audio {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+</style>
|