dev_review
yujialong 5 months ago
parent 6c2437e6f3
commit d611d682a2
  1. 39
      src/App.vue
  2. 43
      src/components/Header.vue
  3. 57
      src/components/quill/index.vue
  4. 3
      src/setting.js
  5. 16
      src/utils/editor.js
  6. 44
      src/utils/http.js
  7. 293
      src/views/course/contentSettings.vue
  8. 7
      src/views/customer/AddCustomer.vue
  9. 143
      src/views/order/Order.vue
  10. 703
      src/views/shop/addProduct/index.vue

@ -1,30 +1,47 @@
<template>
<div id="app">
<el-radio-group v-if="Setting.isDev" v-model="ip" @change="ipChange">
<el-radio :label="0">刘榕ip</el-radio>
<el-radio :label="1">陈赓ip</el-radio>
</el-radio-group>
<router-view></router-view>
</div>
</template>
<script>
export default {
import Setting from '@/setting'
export default {
name: 'App',
data () {
return {
Setting,
ip: localStorage.getItem('nakadaiIp') ? +localStorage.getItem('nakadaiIp') : 0,
};
},
created () {
//sessionStorage
if (sessionStorage.getItem("store") ) {
this.$store.replaceState(Object.assign({}, this.$store.state,JSON.parse(sessionStorage.getItem("store"))))
if (sessionStorage.getItem("store")) {
this.$store.replaceState(Object.assign({}, this.$store.state, JSON.parse(sessionStorage.getItem("store"))))
}
//vuexsessionStorage
window.addEventListener("beforeunload",()=>{
sessionStorage.getItem("token") && sessionStorage.setItem("store",JSON.stringify(this.$store.state))
window.addEventListener("beforeunload", () => {
sessionStorage.getItem("token") && sessionStorage.setItem("store", JSON.stringify(this.$store.state))
})
},
methods: {
ipChange (val) {
localStorage.setItem('nakadaiIp', val)
location.reload()
},
}
}
}
</script>
<style>
@import "./assets/css/main.css";
/* @import "./assets/css/color-dark.css"; */
/*深色主题*/
@import "./assets/css/theme-green/color-green.css";
/* 浅绿色主题 */
@import "./assets/css/main.css";
/* @import "./assets/css/color-dark.css"; */
/*深色主题*/
@import "./assets/css/theme-green/color-green.css";
/* 浅绿色主题 */
</style>

@ -1,29 +1,16 @@
<template>
<div class="header flex-between">
<div class="logo">
<img class="cursor"
@click="goHome"
src="../assets/img/logo.png">
<img class="cursor" @click="goHome" src="../assets/img/logo.png">
</div>
<el-radio-group v-if="Setting.isDev"
v-model="ip"
@change="ipChange">
<el-radio :label="0">刘榕ip</el-radio>
<el-radio :label="1">陈赓ip</el-radio>
</el-radio-group>
<div class="header-right">
<div class="header-user-con">
<div class="user"
@click="toPerson">
<el-avatar :size="40"
:src="$store.state.avatar"></el-avatar>
<span class="user-avator">{{userName}}</span>
<div class="user" @click="toPerson">
<el-avatar :size="40" :src="$store.state.avatar"></el-avatar>
<span class="user-avator">{{ userName }}</span>
</div>
<el-divider class="ml20"
direction="vertical"></el-divider>
<el-button type="text"
class="ml20"
@click="loginout">退出</el-button>
<el-divider class="ml20" direction="vertical"></el-divider>
<el-button type="text" class="ml20" @click="loginout">退出</el-button>
</div>
</div>
</div>
@ -36,7 +23,6 @@ export default {
return {
Setting,
userName: '',
ip: localStorage.getItem('nakadaiIp') ? +localStorage.getItem('nakadaiIp') : 0,
};
},
mounted () {
@ -112,11 +98,6 @@ export default {
Setting.isPro && this.heartbeatDetection()
}).catch(err => { })
},
ipChange (val) {
localStorage.setItem('nakadaiIp', val)
location.reload()
},
},
};
</script>
@ -129,54 +110,66 @@ export default {
font-size: 16px;
color: #333;
}
.header .logo {
float: left;
width: 170px;
height: 40px;
margin-left: 20px;
}
.header .logo img {
width: 100%;
height: 100%;
}
.header-right {
float: right;
padding-right: 50px;
}
.header-user-con {
display: flex;
height: 70px;
align-items: center;
}
.header-user-con .user {
display: inline-flex;
align-items: center;
cursor: pointer;
}
.user-avator {
cursor: pointer;
margin-left: 10px;
font-size: 12px;
}
.ml20 {
margin-left: 20px;
}
.user-avator img {
display: block;
width: 40px;
height: 40px;
border-radius: 50%;
}
/deep/.header-right .el-button--text {
color: #333;
span {
font-size: 12px;
}
}
.header-right .el-divider--vertical {
width: 2px;
height: 15px;
}
.header-right .el-divider {
background-color: #333;
}

@ -1,39 +1,21 @@
<template>
<div>
<el-radio-group v-if="!readonly && radio"
class="type-radio"
v-model="editorType"
@change="typeChange">
<el-radio-group v-if="!readonly && radio" class="type-radio" v-model="editorType" @change="typeChange">
<el-radio label="0">富文本</el-radio>
<el-radio label="1">markdown</el-radio>
</el-radio-group>
<div v-show="editorType == 0"
class="quill"
ref="quill"
:class="classes">
<div ref="editor"
:style="styles"
v-loading="loading"></div>
<Upload :max-size="1000"
:limit="100"
@beforeUpload="beforeUpload"
@onSuccess="editorUploadSuccess"
<div v-show="editorType == 0" class="quill" ref="quill" :class="classes">
<div ref="editor" :style="styles" v-loading="loading"></div>
<Upload :max-size="1000" :limit="100" @beforeUpload="beforeUpload" @onSuccess="editorUploadSuccess"
style="display: none">
<div slot="trigger">
<el-button :id="'editorUpload' + index"
type="primary">点击上传</el-button>
<el-button :id="'editorUpload' + index" type="primary">点击上传</el-button>
</div>
</Upload>
</div>
<mavon-editor class="md"
v-model="mdVal"
v-show="editorType == 1"
ref="md"
:ishljs="true"
:subfield="false"
@change="mdChange"
@imgAdd="imgAdd" />
<mavon-editor class="md" v-model="mdVal" v-show="editorType == 1" ref="md" :ishljs="true" :subfield="false"
@change="mdChange" @imgAdd="imgAdd" />
</div>
</template>
@ -302,15 +284,18 @@ export default {
.type-radio {
margin-bottom: 20px;
}
.quill-no-border {
.ql-toolbar.ql-snow {
border: none;
border-bottom: 1px solid #e8eaec;
}
.ql-container.ql-snow {
border: none;
}
}
.else {
.ql-toolbar.ql-snow {
height: 0;
@ -319,8 +304,10 @@ export default {
border-top: 0;
}
}
/deep/.ql-snow {
position: relative;
.ql-tooltip {
position: absolute !important;
top: 0 !important;
@ -328,10 +315,30 @@ export default {
transform: translateY(10px);
}
}
.md {
max-height: 300px;
}
/deep/.v-note-wrapper .v-note-panel {
min-height: 200px;
}
/deep/.markdown-body {
ul {
list-style: disc;
li {
list-style: inherit;
}
}
ol {
list-style: decimal;
li {
list-style: inherit;
}
}
}
</style>

@ -9,13 +9,14 @@ let jumpPath = `${location.origin}/judgmentPoint/`
let sandPath = `http://121.37.12.51/sandbox` // 沙盘地址
let host = `${location.origin}/`
if (isDev) {
console.log("🚀 ~ localStorage.getItem('nakadaiIp'):",localStorage.getItem('nakadaiIp'))
console.log("🚀 ~ localStorage.getItem('nakadaiIp'):", localStorage.getItem('nakadaiIp'))
jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统
// jumpPath = 'https://judgment.huorantech.cn/'
sandPath = `http://${location.hostname}:9520`
host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/'
host = localStorage.getItem('nakadaiIp') == 1 ? 'http://192.168.31.51:9000/' : 'http://192.168.31.217:9000/'
// host = 'http://192.168.31.51:9000/'
} else if (isPro) {
sandPath = `https://izhixinyun.com/sandbox`
jumpPath = 'https://judgment.huorantech.cn/'

@ -3,12 +3,12 @@ import { Loading } from 'element-ui'
export default {
//skin:'oxide-dark',
language:'zh_CN',
language: 'zh_CN',
language_url: './styles/tinymce/langs/zh_CN.js',
plugins: 'print powerpaste preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template advcode codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave autoresize formatpainter',
toolbar: 'code undo redo restoredraft | cut copy powerpaste pastetext | forecolor backcolor headings fontsize lineHeight bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify | \
plugins: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave autoresize',
toolbar: 'code undo redo restoredraft | cut copy pastetext | forecolor backcolor headings fontsize lineHeight bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify | \
styleselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | \
table image media charmap emoticons hr pagebreak insertdatetime print preview | fullscreen | indent2em formatpainter',
table image media charmap emoticons hr pagebreak insertdatetime print preview | fullscreen | indent2em',
style_formats: [
//新增 首行缩进与行高 配置
{
@ -206,7 +206,7 @@ export default {
// template_cdate_format: '[CDATE: %m/%d/%Y : %H:%M:%S]',
// template_mdate_format: '[MDATE: %m/%d/%Y : %H:%M:%S]',
// autosave_ask_before_unload: false,
toolbar_mode : 'wrap',
toolbar_mode: 'wrap',
// automatic_uploads: true,
// images_upload_base_path: '/demo',
// images_upload_url: 'http://10.10.11.7:10000/iasf/sysFiles/upload',
@ -248,7 +248,7 @@ export default {
let input = document.createElement('input');//创建一个隐藏的input
input.setAttribute('type', 'file');
input.setAttribute("accept", ".mp4");
input.onchange = function(){
input.onchange = function () {
let file = this.files[0];
const load = Loading.service()
Oss.upload(file).then(res => {
@ -263,8 +263,8 @@ export default {
}
},
// 初始化事件
setup: function(editor) {
editor.on('init', function(ed) {
setup: function (editor) {
editor.on('init', function (ed) {
// 设置默认字体
ed.target.editorCommands.execCommand("fontName", false, "PingFang SC")
ed.target.editorCommands.execCommand("fontSize", false, "16px")

@ -14,17 +14,17 @@ axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';
// 请求拦截器
axios.interceptors.request.use(config => {
let token = sessionStorage.getItem('token')
if(token){
if (token) {
config.headers.token = token
}
let schoolId = store.state.schoolId
if(schoolId) config.headers.schoolId = store.state.schoolId
if (schoolId) config.headers.schoolId = store.state.schoolId
return config;
}, err => {
Message.error({
message: '退出登陆',
onClose: function () {
router.push({name: 'login'});
router.push({ name: 'login' });
}
})
return Promise.reject(err);
@ -35,7 +35,7 @@ let logouted = 0;
axios.interceptors.response.use(
response => {
if (response.status === 200) {
const { status } = response.data
const { status, code, msg } = response.data
if (status) {
// 接口定义的非正常返回的时候,应当处于报错状态
if (status === 10020) {
@ -47,11 +47,27 @@ axios.interceptors.response.use(
} else {
return Promise.resolve(response)
}
} else if (code === 401) {
// 账号互踢
if (!logouted) {
sessionStorage.removeItem('token')
Message.error(msg.includes('顶') ? '您的账号已在其他设备登录,您已被迫下线!' : '登录过期,请重新登录!')
setTimeout(() => {
router.replace({
path: '/login',
query: {
redirect: router.currentRoute.fullPath
}
})
logouted = 0
}, 1500)
logouted = 1
}
} else {
return Promise.resolve(response)
}
} else {
Message.error(response.message,'res');
Message.error(response.message, 'res');
return Promise.reject(response);
}
},
@ -116,7 +132,7 @@ axios.interceptors.response.use(
);
function logouts(){
function logouts () {
store.replaceState({})
localStorage.clear()
sessionStorage.clear()
@ -130,8 +146,8 @@ let tokenStatus = {
/**
* get方法对应get请求
*/
export function get(url, params){
return new Promise((resolve, reject) =>{
export function get (url, params) {
return new Promise((resolve, reject) => {
axios.get(url, {
params: params
})
@ -146,9 +162,9 @@ export function get(url, params){
/**
* post方法对应post请求
*/
export function post(url, params, config) {
export function post (url, params, config) {
return new Promise((resolve, reject) => {
axios.post(url,params, config)
axios.post(url, params, config)
.then(res => {
return resolve(res.data);
})
@ -161,8 +177,8 @@ export function post(url, params, config) {
/**
* delete方法对应delete请求
*/
export function del(url, params){
return new Promise((resolve, reject) =>{
export function del (url, params) {
return new Promise((resolve, reject) => {
axios.delete(url, {
params: params
})
@ -180,8 +196,8 @@ export function post(url, params, config) {
* @param {} url
* @param {*} params
*/
export function put(url, params){
return new Promise((resolve, reject) =>{
export function put (url, params) {
return new Promise((resolve, reject) => {
axios.put(url, params)
.then(res => {
resolve(res.data);

@ -1,343 +1,215 @@
<template>
<div>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<el-page-header @back="back"
:content="name + '/' + (sorting? '编辑排序' : '内容设置')"></el-page-header>
<el-page-header @back="back" :content="name + '/' + (sorting ? '编辑排序' : '内容设置')"></el-page-header>
</div>
</el-card>
<!--内容设置-->
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div class="page">
<div class="relative">
<div class="p-title">内容设置</div>
<div class="btns">
<template v-if="!sorting">
<el-button type="primary"
round
@click="addChapter"
v-auth="'/curriculum:内容设置:添加章节'">添加章节</el-button>
<el-button type="primary"
round
@click="sort"
v-auth="'/curriculum:内容设置:编辑排序'">编辑顺序</el-button>
<el-button type="primary" round @click="addChapter" v-auth="'/curriculum:内容设置:添加章节'">添加章节</el-button>
<el-button type="primary" round @click="sort" v-auth="'/curriculum:内容设置:编辑排序'">编辑顺序</el-button>
</template>
<template v-else>
<el-button type="primary"
round
@click="move">批量移动</el-button>
<el-button type="primary"
round
@click="cancelSort">取消</el-button>
<el-button type="primary"
round
@click="saveSort">保存</el-button>
<el-button type="primary" round @click="move">批量移动</el-button>
<el-button type="primary" round @click="cancelSort">取消</el-button>
<el-button type="primary" round @click="saveSort">保存</el-button>
</template>
</div>
</div>
<el-divider></el-divider>
<div class="page-content">
<div class="mgb20"
v-for="(chapter,index) in chapters"
:key="chapter.id">
<div class="mgb20" v-for="(chapter, index) in chapters" :key="chapter.id">
<div class="flex-between mgb10">
<div>{{ chapter.name }}</div>
<div>
<template v-if="!sorting">
<el-button class="action-btn"
plain
@click="editChapter(chapter)"
<el-button class="action-btn" plain @click="editChapter(chapter)"
v-auth="'/curriculum:内容设置:修改章节名称'">修改章节名称</el-button>
<el-button class="action-btn"
plain
@click="addSection(chapter.id)"
<el-button class="action-btn" plain @click="addSection(chapter.id)"
v-auth="'/curriculum:内容设置:添加小节'">添加小节</el-button>
<el-button class="action-btn"
plain
@click="delChapter(chapter.id)"
<el-button class="action-btn" plain @click="delChapter(chapter.id)"
v-auth="'/curriculum:内容设置:删除章节'">删除</el-button>
</template>
<template v-else>
<i class="el-icon-top sort-icon"
:class="{disabled: index == 0}"
style="margin-right: 5px"
@click="sortChapter(chapter,'up',index == 0,index)"></i>
<i class="el-icon-bottom sort-icon"
:class="{disabled: index == chapters.length-1}"
@click="sortChapter(chapter,'down',index == chapter.length-1,index)"></i>
<i class="el-icon-top sort-icon" :class="{ disabled: index == 0 }" style="margin-right: 5px"
@click="sortChapter(chapter, 'up', index == 0, index)"></i>
<i class="el-icon-bottom sort-icon" :class="{ disabled: index == chapters.length - 1 }"
@click="sortChapter(chapter, 'down', index == chapter.length - 1, index)"></i>
</template>
</div>
</div>
<el-table :data="chapter.subsectionList"
class="table"
stripe
header-align="center"
row-key="id">
<el-table-column v-if="sorting"
width="55"
align="center">
<el-table :data="chapter.subsectionList" class="table" stripe header-align="center" row-key="id">
<el-table-column v-if="sorting" width="55" align="center">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.check"></el-checkbox>
</template>
</el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center"></el-table-column>
<el-table-column prop="name"
label="资源名称">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="资源名称">
</el-table-column>
<el-table-column prop="fileType"
label="资源类型"
align="center">
<el-table-column prop="fileType" label="资源类型" align="center">
<template slot-scope="scope">
{{ transferType(scope.row.fileType) }}
</template>
</el-table-column>
<el-table-column label="操作"
align="center"
width="300">
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<template v-if="!sorting">
<el-button type="text"
@click="download(scope.row)"
v-auth="'/curriculum:内容设置:下载'">下载</el-button>
<el-button type="text"
@click="preview(scope.row)"
v-auth="'/curriculum:内容设置:查看'">查看</el-button>
<el-button type="text"
@click="delSection(scope.row)"
<el-button type="text" @click="download(scope.row)" v-auth="'/curriculum:内容设置:下载'">下载</el-button>
<el-button type="text" @click="preview(scope.row)" v-auth="'/curriculum:内容设置:查看'">查看</el-button>
<el-button type="text" @click="delSection(scope.row)"
v-auth="'/curriculum:内容设置:删除小节'">删除</el-button>
<el-button type="text"
@click="editSectionName(scope.row,chapter.id)"
<el-button type="text" @click="editSectionName(scope.row, chapter.id)"
v-auth="'/curriculum:内容设置:修改小节名称'">修改小节名称</el-button>
<el-button type="text"
@click="switchFile(scope.row,chapter.id)"
<el-button type="text" @click="switchFile(scope.row, chapter.id)"
v-auth="'/curriculum:内容设置:更换文件'">更换文件</el-button>
</template>
<template v-else>
<i class="el-icon-top sort-icon"
:class="{disabled: scope.$index == 0}"
style="margin-right: 5px"
@click="sortSection(index,'up',scope.$index == 0,scope.$index)"></i>
<i class="el-icon-top sort-icon" :class="{ disabled: scope.$index == 0 }" style="margin-right: 5px"
@click="sortSection(index, 'up', scope.$index == 0, scope.$index)"></i>
<i class="el-icon-bottom sort-icon"
:class="{disabled: scope.$index == chapter.subsectionList.length-1}"
@click="sortSection(index,'down',scope.$index == chapter.subsectionList.length-1,scope.$index)"></i>
:class="{ disabled: scope.$index == chapter.subsectionList.length - 1 }"
@click="sortSection(index, 'down', scope.$index == chapter.subsectionList.length - 1, scope.$index)"></i>
</template>
</template>
</el-table-column>
</el-table>
</div>
<el-dialog :title="chapterId ? '编辑章节' : '新增章节'"
:visible.sync="chapterVisible"
width="540px"
<el-dialog :title="chapterId ? '编辑章节' : '新增章节'" :visible.sync="chapterVisible" width="540px"
:close-on-click-modal="false">
<el-form>
<el-form-item>
<el-input placeholder="请输入章节名称,便于对小节归类"
v-model="chapterName"
maxlength="50"></el-input>
<el-input placeholder="请输入章节名称,便于对小节归类" v-model="chapterName" maxlength="50"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="chapterVisible = false">取消</el-button>
<el-button type="primary"
@click="chapterSubmit">确定</el-button>
<el-button type="primary" @click="chapterSubmit">确定</el-button>
</span>
</el-dialog>
<el-dialog title="添加小节"
:visible.sync="sectionVisible"
width="540px"
@close="closeSection"
<el-dialog title="添加小节" :visible.sync="sectionVisible" width="540px" @close="closeSection"
:close-on-click-modal="false">
<el-form ref="form"
:model="sectionForm"
label-width="80px"
@submit.native.prevent>
<el-form ref="form" :model="sectionForm" label-width="80px" @submit.native.prevent>
<el-form-item label="资源添加">
<Upload :max-size="100000"
:file-list="uploadList"
:on-remove="handleRemove"
@beforeUpload="beforeUpload"
@onSuccess="uploadSuccess">
<Upload :max-size="100000" :file-list="uploadList" :on-remove="handleRemove"
@beforeUpload="beforeUpload" @onSuccess="uploadSuccess">
<template slot="tip">
<p>视频请上传MP4格式大小不超过150Moffice文件大小不要超过10M</p>
</template>
</Upload>
</el-form-item>
<el-form-item label="小节名称">
<el-input placeholder="请输入小节名称"
v-model.trim="sectionForm.sectionName"
maxlength="50"
<el-input placeholder="请输入小节名称" v-model.trim="sectionForm.sectionName" maxlength="50"
@keyup.enter.native="sectionSubmit()"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="sectionVisible = false">取消</el-button>
<el-button type="primary"
@click="sectionSubmit">确定</el-button>
<el-button type="primary" @click="sectionSubmit">确定</el-button>
</span>
</el-dialog>
<el-dialog title="更换文件"
:visible.sync="switchVisible"
width="540px"
:close-on-click-modal="false"
<el-dialog title="更换文件" :visible.sync="switchVisible" width="540px" :close-on-click-modal="false"
@close="closeSwitch">
<div style="text-align: center">
<Upload :max-size="100000"
:file-list="uploadList"
:on-remove="handleRemove"
@beforeUpload="beforeUpload"
<Upload :max-size="100000" :file-list="uploadList" :on-remove="handleRemove" @beforeUpload="beforeUpload"
@onSuccess="uploadSuccess">
<div slot="tip"></div>
</Upload>
</div>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="switchVisible = false">取消</el-button>
<el-button type="primary"
@click="switchSubmit">确定</el-button>
<el-button type="primary" @click="switchSubmit">确定</el-button>
</span>
</el-dialog>
<el-dialog title="修改小节名称"
:visible.sync="sectionNameVisible"
width="540px"
:close-on-click-modal="false">
<el-dialog title="修改小节名称" :visible.sync="sectionNameVisible" width="540px" :close-on-click-modal="false">
<el-form @submit.native.prevent>
<el-form-item>
<el-input placeholder="请输入小节名称"
v-model="sectionForm.sectionName"
maxlength="50"
<el-input placeholder="请输入小节名称" v-model="sectionForm.sectionName" maxlength="50"
@keyup.enter.native="sectionNameSubmit()"></el-input>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="sectionNameVisible = false">取消</el-button>
<el-button type="primary"
@click="sectionNameSubmit">确定</el-button>
<el-button type="primary" @click="sectionNameSubmit">确定</el-button>
</span>
</el-dialog>
<div v-show="previewImg"
class="el-image-viewer__wrapper"
:class="{active: previewImg}"
<div v-show="previewImg" class="el-image-viewer__wrapper" :class="{ active: previewImg }"
style="z-index: 2000">
<div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close"
@click="previewImg = ''"><i class="el-icon-circle-close"
style="color: #fff"></i></span>
<span class="el-image-viewer__btn el-image-viewer__close" @click="previewImg = ''"><i
class="el-icon-circle-close" style="color: #fff"></i></span>
<div class="el-image-viewer__canvas">
<img :src="previewImg"
class="el-image-viewer__img"
<img :src="previewImg" class="el-image-viewer__img"
style="transform: scale(1) rotate(0deg);margin-top: -1px; max-height: 100%; max-width: 100%;">
</div>
</div>
<div v-show="iframeSrc || videoSrc"
class="el-image-viewer__wrapper"
:class="{active: iframeSrc}"
<div v-show="iframeSrc || videoSrc" class="el-image-viewer__wrapper" :class="{ active: iframeSrc }"
style="z-index: 2000">
<div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close"
:class="{'doc-close': isWord}"
:style="{top: isWord ? '50px' : '5px'}"
@click="closeIframe"><i class="el-icon-circle-close"
<span class="el-image-viewer__btn el-image-viewer__close" :class="{ 'doc-close': isWord }"
:style="{ top: isWord ? '50px' : '5px' }" @click="closeIframe"><i class="el-icon-circle-close"
style="color: #fff"></i></span>
<div class="el-image-viewer__canvas">
<iframe v-if="iframeSrc"
class="fileIframe"
id="fileIframe"
:src="iframeSrc"
frameborder="0"></iframe>
<video v-if="videoSrc"
class="video"
width="1200"
height="600"
autoplay
controls>
<source :src="videoSrc"
type="video/mp4">
<iframe v-if="iframeSrc" class="fileIframe" id="fileIframe" :src="iframeSrc" frameborder="0"></iframe>
<video v-if="videoSrc" class="video" width="1200" height="600" autoplay controls>
<source :src="videoSrc" type="video/mp4">
您的浏览器不支持 video 标签
</video>
<template v-if="showMask">
<div class="mask"
style="width: 200px;height: 30px;top: 53px;right: 320px"></div>
<div class="mask"
style="width: 175px;height: 30px;top: 53px;right: 5px"></div>
<div class="mask" style="width: 200px;height: 30px;top: 53px;right: 320px"></div>
<div class="mask" style="width: 175px;height: 30px;top: 53px;right: 5px"></div>
</template>
<template v-if="showMask1">
<div class="word-mask1"
style="width: 200px;height: 50px;"></div>
<div class="word-mask"
style="height: 40px;top: 48px;"></div>
<div class="word-mask2"
style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div>
<div class="word-mask1" style="width: 200px;height: 50px;"></div>
<div class="word-mask" style="height: 40px;top: 48px;"></div>
<div class="word-mask2" style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div>
</template>
<template v-if="showMask2 && iframeSrc">
<div class="excel-mask1"
style="height: 48px;"></div>
<div class="excel-mask1" style="height: 48px;"></div>
</template>
</div>
</div>
<div v-show="playAuth"
class="el-image-viewer__wrapper"
:class="{active: playAuth}"
style="z-index: 2000">
<div v-show="playAuth" class="el-image-viewer__wrapper" :class="{ active: playAuth }" style="z-index: 2000">
<div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close"
@click="closePlayer"><i class="el-icon-circle-close"
style="color: #fff"></i></span>
<div class="player"
id="player"></div>
<span class="el-image-viewer__btn el-image-viewer__close" @click="closePlayer"><i
class="el-icon-circle-close" style="color: #fff"></i></span>
<div class="player" id="player"></div>
</div>
<Pdf :visible.sync="pdfVisible"
:src.sync="pdfSrc" />
<Pdf :visible.sync="pdfVisible" :src.sync="pdfSrc" />
</div>
</div>
</el-card>
<div class="player-download"
id="playerDownload"></div>
<div class="player-download" id="playerDownload"></div>
<el-dialog title="资源移动"
:visible.sync="moveVisible"
:close-on-click-modal="false"
width="330px">
<el-dialog title="资源移动" :visible.sync="moveVisible" :close-on-click-modal="false" width="330px">
<el-form>
<el-form-item label="目标章节">
<el-select v-model="moveForm.id"
placeholder="请选择目标章节"
@change="chapterChange">
<el-option v-for="(item, i) in chapters"
:key="i"
:label="item.name"
:value="item.id"></el-option>
<el-select v-model="moveForm.id" placeholder="请选择目标章节" @change="chapterChange">
<el-option v-for="(item, i) in chapters" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="目标排序">
<el-select v-model="moveForm.sort"
placeholder="请选择目标排序">
<el-option v-for="(item, i) in sortList"
:key="i"
:label="item.name"
:value="item.id"></el-option>
<el-select v-model="moveForm.sort" placeholder="请选择目标排序">
<el-option v-for="(item, i) in sortList" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer"
class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button @click="moveVisible = false">取消</el-button>
<el-button type="primary"
@click="moveConfirm">确定</el-button>
<el-button type="primary" @click="moveConfirm">确定</el-button>
</span>
</el-dialog>
</div>
@ -753,7 +625,7 @@ export default {
const { fileType, fileId } = row
// ppt
if (fileType === 'pptx') {
this.downloadFile(row.name, row.fileUrl)
this.downloadFile(row.originalFileName || row.name, row.fileUrl)
} else if (fileId) {
//
this.$get(`${this.api.getPlayAuth}/${fileId}`).then(res => {
@ -952,6 +824,7 @@ export default {
max-height: calc(100vh - 420px);
overflow: auto;
}
.action-btn {
color: #9076ff;
font-size: 14px;
@ -979,10 +852,12 @@ export default {
cursor: not-allowed;
}
}
/deep/.el-progress-bar {
padding-right: 70px;
margin-right: -70px;
}
.el-upload__tip {
position: absolute;
top: -4px;
@ -990,6 +865,7 @@ export default {
width: 300px;
line-height: 1.4;
}
.el-image-viewer__wrapper {
transform: translateY(-10px);
transition: transform 0.5s;
@ -1019,6 +895,7 @@ export default {
width: 1200px !important;
height: 600px !important;
}
.player-download {
position: absolute;
top: -9999px;

@ -401,8 +401,8 @@ export default {
customerId: "",
customerName: '',
countries: '中国',
industryClassId: '',
industryId: '',
industryClassId: 16,
industryId: 83,
provinceId: '',
account: '',
name: '',
@ -677,6 +677,7 @@ export default {
this.getSchool()
}).catch((res) => { })
} else {
this.changIndustryData()
this.getSchool()
}
},
@ -894,7 +895,7 @@ export default {
this.customerVisible = false
this.$message.success('添加成功')
this.getCustomer()
this.getSchool(res.schoolId || '')
this.getSchool(!this.customerId ? res.schoolId || '' : '') //
},
//
getCategory () {

@ -1,7 +1,6 @@
<template>
<div>
<el-card shadow="hover"
class="mgb20">
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
@ -11,63 +10,41 @@
<el-form label-width="80px">
<el-col :span="4">
<el-form-item label="省份">
<el-select v-model="form.provinceId"
clearable
placeholder="请选择省份"
@change="getCity()"
<el-select v-model="form.provinceId" clearable placeholder="请选择省份" @change="getCity()"
@clear="clearprovince()">
<el-option v-for="(item,index) in provinceList"
:key="index"
:label="item.provinceName"
<el-option v-for="(item, index) in provinceList" :key="index" :label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="城市">
<el-select v-model="form.cityId"
clearable
placeholder="请选择城市"
:disabled="form.provinceId ? false : true"
@change="getData()">
<el-option v-for="(item,index) in cityList"
:key="index"
:label="item.cityName"
<el-select v-model="form.cityId" clearable placeholder="请选择城市"
:disabled="form.provinceId ? false : true" @change="getData()">
<el-option v-for="(item, index) in cityList" :key="index" :label="item.cityName"
:value="item.cityId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="订单类型">
<el-select v-model="form.orderType"
clearable
placeholder="请选择订单类型"
@change="getData()">
<el-option v-for="(item,index) in orderTypeList"
:key="index"
:label="item.name"
<el-select v-model="form.orderType" clearable placeholder="请选择订单类型" @change="getData()">
<el-option v-for="(item, index) in orderTypeList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="订单状态">
<el-select v-model="form.orderStatus"
clearable
placeholder="请选择订单状态"
@change="getData()">
<el-option v-for="(item,index) in orderStatusList"
:key="index"
:label="item.name"
<el-select v-model="form.orderStatus" clearable placeholder="请选择订单状态" @change="getData()">
<el-option v-for="(item, index) in orderStatusList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-input placeholder="请输入订单号/客户名称/订单名称"
prefix-icon="el-icon-search"
v-model="form.customerName"
<el-input placeholder="请输入订单号/客户名称/订单名称" prefix-icon="el-icon-search" v-model="form.customerName"
clearable></el-input>
</el-form-item>
</el-col>
@ -76,104 +53,56 @@
</div>
</el-card>
<el-card shadow="hover"
class="card">
<el-card shadow="hover" class="card">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="hr_tag"></p>
<span>订单列表</span>
</div>
<div>
<el-button type="primary"
round
@click="addOrder"
v-auth>新建订单</el-button>
<el-button type="primary"
round
@click="delAllSelection"
v-auth>批量删除</el-button>
<el-button type="primary" round @click="addOrder" v-auth>新建订单</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button>
</div>
</div>
<el-table :data="orderData"
class="table"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="orderId">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
<el-table :data="orderData" class="table" ref="table" stripe header-align="center"
@selection-change="handleSelectionChange" row-key="orderId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
</el-table-column>
<el-table-column prop="orderNumber"
label="订单编号"
align="center">
<el-table-column prop="orderNumber" label="订单编号" align="center">
</el-table-column>
<el-table-column prop="customerName"
label="客户名称"
align="center">
<el-table-column prop="customerName" label="客户名称" align="center">
</el-table-column>
<el-table-column prop="orderContent"
label="订单内容"
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column prop="orderAmount"
label="订单金额(元)"
align="center">
<el-table-column prop="orderContent" label="订单内容" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="orderAmount" label="订单金额(元)" align="center">
<template slot-scope="scope">
{{ scope.row.orderType === '试用' ? 0 : scope.row.orderAmount }}
</template>
</el-table-column>
<el-table-column prop="createTime"
label="订单日期"
align="center">
<el-table-column prop="createTime" label="订单日期" align="center">
</el-table-column>
<el-table-column prop="orderType"
label="订单类型"
align="center">
<el-table-column prop="orderType" label="订单类型" align="center">
</el-table-column>
<el-table-column prop="orderStatus"
label="订单状态"
align="center">
<el-table-column prop="orderStatus" label="订单状态" align="center">
</el-table-column>
<el-table-column prop="orderNature"
label="订单性质"
align="center">
<el-table-column prop="orderNature" label="订单性质" align="center">
</el-table-column>
<el-table-column label="操作"
align="center">
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text"
v-if="scope.row.isDel!==1"
@click="handle('edit',scope.row)"
v-auth="'/order:修改'">
<el-button type="text" v-if="scope.row.isDel !== 1" @click="handle('edit', scope.row)" v-auth="'/order:修改'">
{{ scope.row.orderStatus === "已完成" ? "修改" : "处理" }}
</el-button>
<el-button type="text"
@click="handle('watch',scope.row)"
v-auth>查看</el-button>
<el-button type="text"
@click="handleDelete(scope.row)"
v-auth>删除</el-button>
<el-button type="text"
v-if="scope.row.orderStatus==='已完成'&&scope.row.isDel!==1"
@click="handle('renew',scope.row)"
v-auth>续费
<el-button type="text" @click="handle('watch', scope.row)" v-auth>查看</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button>
<el-button type="text" v-if="scope.row.orderStatus === '已完成' && scope.row.isDel !== 1"
@click="handle('renew', scope.row)" v-auth>续费
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
@current-change="handleCurrentChange"
:current-page="page"
:total="totals">
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChange"
:current-page="page" :total="totals">
</el-pagination>
</div>
</el-card>
@ -404,9 +333,11 @@ export default {
.card {
min-height: calc(100vh - 300px);
}
.mag {
margin-right: 20px;
}
.cell {
white-space: pre-wrap;
width: 140px;
@ -417,6 +348,7 @@ export default {
line-clamp: 2;
-webkit-box-orient: vertical;
}
.tags {
border: none;
background: none;
@ -431,4 +363,3 @@ export default {
-webkit-box-orient: vertical;
}
</style>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save