紧急修复了一些bug
This commit is contained in:
@@ -90,7 +90,7 @@ export function AddArticle(pram) {
|
||||
return request({
|
||||
url: '/admin/article/save',
|
||||
method: 'post',
|
||||
params: data
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -101,7 +101,6 @@ export function AddArticle(pram) {
|
||||
*/
|
||||
export function UpdateArticle(pram) {
|
||||
const data = {
|
||||
id: pram.id,
|
||||
author: pram.author,
|
||||
cid: pram.cid,
|
||||
content: pram.content,
|
||||
@@ -118,6 +117,7 @@ export function UpdateArticle(pram) {
|
||||
return request({
|
||||
url: '/admin/article/update',
|
||||
method: 'post',
|
||||
params: data
|
||||
params: { id: pram.id },
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -77,10 +77,11 @@ export function couponUserListApi(params) {
|
||||
* 积分日志 列表
|
||||
* @param pram
|
||||
*/
|
||||
export function integralListApi(data) {
|
||||
export function integralListApi(params, data) {
|
||||
return request({
|
||||
url: '/admin/user/bill/list',
|
||||
method: 'post',
|
||||
params,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -241,3 +241,15 @@ export function importProductApi(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 恢复
|
||||
* @param pram
|
||||
*/
|
||||
export function restoreApi(params) {
|
||||
return request({
|
||||
url: `/admin/store/product/importProduct`,
|
||||
method: 'post',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ export function fileFileApi(data, params) {
|
||||
*/
|
||||
export function fileImageApi(data, params) {
|
||||
return request({
|
||||
url: '/admin/wechat/media/upload',
|
||||
url: '/admin/upload/image',
|
||||
method: 'POST',
|
||||
params,
|
||||
data
|
||||
@@ -91,3 +91,17 @@ export function attachmentMoveApi(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 微信上传图片
|
||||
* @param data
|
||||
*/
|
||||
export function wechatUploadApi(data, params) {
|
||||
return request({
|
||||
url: `/admin/wechat/media/upload`,
|
||||
method: 'post',
|
||||
data,
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -29,25 +29,11 @@ export function adminInfo(pram) {
|
||||
})
|
||||
}
|
||||
|
||||
export function adminList(pram) {
|
||||
const data = {
|
||||
account: pram.account,
|
||||
addTime: pram.addTime,
|
||||
isDel: pram.isDel,
|
||||
lastIp: pram.lastIp,
|
||||
lastTime: pram.lastTime,
|
||||
level: pram.level,
|
||||
loginCount: pram.loginCount,
|
||||
page: pram.page,
|
||||
limit: pram.limit,
|
||||
realName: pram.realName,
|
||||
roles: pram.roles,
|
||||
status: pram.status
|
||||
}
|
||||
export function adminList(params) {
|
||||
return request({
|
||||
url: '/admin/system/admin/list',
|
||||
method: 'GET',
|
||||
params: data
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
<template>
|
||||
<transition :name="transitionName">
|
||||
<div v-show="visible" :style="customStyle" class="back-to-ceiling" @click="backToTop">
|
||||
<svg width="16" height="16" viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg" class="Icon Icon--backToTopArrow" aria-hidden="true" style="height:16px;width:16px"><path d="M12.036 15.59a1 1 0 0 1-.997.995H5.032a.996.996 0 0 1-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29a1.003 1.003 0 0 1 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z" /></svg>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'BackToTop',
|
||||
props: {
|
||||
visibilityHeight: {
|
||||
type: Number,
|
||||
default: 400
|
||||
},
|
||||
backPosition: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
customStyle: {
|
||||
type: Object,
|
||||
default: function() {
|
||||
return {
|
||||
right: '50px',
|
||||
bottom: '50px',
|
||||
width: '40px',
|
||||
height: '40px',
|
||||
'border-radius': '4px',
|
||||
'line-height': '45px',
|
||||
background: '#e7eaf1'
|
||||
}
|
||||
}
|
||||
},
|
||||
transitionName: {
|
||||
type: String,
|
||||
default: 'fade'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
interval: null,
|
||||
isMoving: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('scroll', this.handleScroll)
|
||||
if (this.interval) {
|
||||
clearInterval(this.interval)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleScroll() {
|
||||
this.visible = window.pageYOffset > this.visibilityHeight
|
||||
},
|
||||
backToTop() {
|
||||
if (this.isMoving) return
|
||||
const start = window.pageYOffset
|
||||
let i = 0
|
||||
this.isMoving = true
|
||||
this.interval = setInterval(() => {
|
||||
const next = Math.floor(this.easeInOutQuad(10 * i, start, -start, 500))
|
||||
if (next <= this.backPosition) {
|
||||
window.scrollTo(0, this.backPosition)
|
||||
clearInterval(this.interval)
|
||||
this.isMoving = false
|
||||
} else {
|
||||
window.scrollTo(0, next)
|
||||
}
|
||||
i++
|
||||
}, 16.7)
|
||||
},
|
||||
easeInOutQuad(t, b, c, d) {
|
||||
if ((t /= d / 2) < 1) return c / 2 * t * t + b
|
||||
return -c / 2 * (--t * (t - 2) - 1) + b
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.back-to-ceiling {
|
||||
position: fixed;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.back-to-ceiling:hover {
|
||||
background: #d5dbe7;
|
||||
}
|
||||
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity .5s;
|
||||
}
|
||||
|
||||
.fade-enter,
|
||||
.fade-leave-to {
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
.back-to-ceiling .Icon {
|
||||
fill: #9aaabf;
|
||||
background: none;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form ref="editPram" :model="editPram" label-width="130px">
|
||||
{{biztype}}
|
||||
<el-form-item
|
||||
label="分类名称"
|
||||
prop="name"
|
||||
@@ -34,16 +33,6 @@
|
||||
<el-form-item label="状态">
|
||||
<el-switch v-model="editPram.status" :active-value="true" :inactive-value="false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="type" :rules="[{required:true,message:'请选择类型',trigger:['blur']}]">
|
||||
<el-select v-model="editPram.type" disabled>
|
||||
<el-option
|
||||
v-for="item in constants.categoryType"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="扩展字段" v-if="biztype.value !== 1 && biztype.value !== 3 && biztype.value !== 5">
|
||||
<el-input v-model="editPram.extra" type="textarea" placeholder="扩展字段" />
|
||||
</el-form-item>
|
||||
@@ -52,8 +41,6 @@
|
||||
<el-button @click="close">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- {{// editPram}}-->
|
||||
<!-- {{prent}}-->
|
||||
</div>
|
||||
</template>
|
||||
<!--创建和编辑公用一个组件-->
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
{{biztype}}
|
||||
<el-form inline size="small">
|
||||
<el-form-item>
|
||||
<el-select v-model="listPram.status" placeholder="状态" clearable class="selWidth">
|
||||
@@ -87,7 +86,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="200" fixed="right">
|
||||
{{biztype}}
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="biztype.value!==3"
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
<template>
|
||||
<el-select ref="dragSelect" v-model="selectVal" v-bind="$attrs" class="drag-select" multiple v-on="$listeners">
|
||||
<slot />
|
||||
</el-select>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Sortable from 'sortablejs'
|
||||
|
||||
export default {
|
||||
name: 'DragSelect',
|
||||
props: {
|
||||
value: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
selectVal: {
|
||||
get() {
|
||||
return [...this.value]
|
||||
},
|
||||
set(val) {
|
||||
this.$emit('input', [...val])
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setSort()
|
||||
},
|
||||
methods: {
|
||||
setSort() {
|
||||
const el = this.$refs.dragSelect.$el.querySelectorAll('.el-select__tags > span')[0]
|
||||
this.sortable = Sortable.create(el, {
|
||||
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
|
||||
setData: function(dataTransfer) {
|
||||
dataTransfer.setData('Text', '')
|
||||
// to avoid Firefox bug
|
||||
// Detail see : https://github.com/RubaXa/Sortable/issues/1012
|
||||
},
|
||||
onEnd: evt => {
|
||||
const targetRow = this.value.splice(evt.oldIndex, 1)[0]
|
||||
this.value.splice(evt.newIndex, 0, targetRow)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.drag-select >>> .sortable-ghost {
|
||||
opacity: .8;
|
||||
color: #fff!important;
|
||||
background: #42b983!important;
|
||||
}
|
||||
|
||||
.drag-select >>> .el-tag {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@@ -1,297 +0,0 @@
|
||||
<template>
|
||||
<div :id="id" :ref="id" :action="url" class="dropzone">
|
||||
<input type="file" name="file">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Dropzone from 'dropzone'
|
||||
import 'dropzone/dist/dropzone.css'
|
||||
// import { getToken } from 'api/qiniu';
|
||||
|
||||
Dropzone.autoDiscover = false
|
||||
|
||||
export default {
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
url: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
clickable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
defaultMsg: {
|
||||
type: String,
|
||||
default: '上传图片'
|
||||
},
|
||||
acceptedFiles: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
thumbnailHeight: {
|
||||
type: Number,
|
||||
default: 200
|
||||
},
|
||||
thumbnailWidth: {
|
||||
type: Number,
|
||||
default: 200
|
||||
},
|
||||
showRemoveLink: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
maxFilesize: {
|
||||
type: Number,
|
||||
default: 2
|
||||
},
|
||||
maxFiles: {
|
||||
type: Number,
|
||||
default: 3
|
||||
},
|
||||
autoProcessQueue: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
useCustomDropzoneOptions: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
defaultImg: {
|
||||
default: '',
|
||||
type: [String, Array]
|
||||
},
|
||||
couldPaste: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dropzone: '',
|
||||
initOnce: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
defaultImg(val) {
|
||||
if (val.length === 0) {
|
||||
this.initOnce = false
|
||||
return
|
||||
}
|
||||
if (!this.initOnce) return
|
||||
this.initImages(val)
|
||||
this.initOnce = false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const element = document.getElementById(this.id)
|
||||
const vm = this
|
||||
this.dropzone = new Dropzone(element, {
|
||||
clickable: this.clickable,
|
||||
thumbnailWidth: this.thumbnailWidth,
|
||||
thumbnailHeight: this.thumbnailHeight,
|
||||
maxFiles: this.maxFiles,
|
||||
maxFilesize: this.maxFilesize,
|
||||
dictRemoveFile: 'Remove',
|
||||
addRemoveLinks: this.showRemoveLink,
|
||||
acceptedFiles: this.acceptedFiles,
|
||||
autoProcessQueue: this.autoProcessQueue,
|
||||
dictDefaultMessage: '<i style="margin-top: 3em;display: inline-block" class="material-icons">' + this.defaultMsg + '</i><br>Drop files here to upload',
|
||||
dictMaxFilesExceeded: '只能一个图',
|
||||
previewTemplate: '<div class="dz-preview dz-file-preview"> <div class="dz-image" style="width:' + this.thumbnailWidth + 'px;height:' + this.thumbnailHeight + 'px" ><img style="width:' + this.thumbnailWidth + 'px;height:' + this.thumbnailHeight + 'px" data-dz-thumbnail /></div> <div class="dz-details"><div class="dz-size"><span data-dz-size></span></div> <div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <i class="material-icons">done</i> </div> <div class="dz-error-mark"><i class="material-icons">error</i></div></div>',
|
||||
init() {
|
||||
const val = vm.defaultImg
|
||||
if (!val) return
|
||||
if (Array.isArray(val)) {
|
||||
if (val.length === 0) return
|
||||
val.map((v, i) => {
|
||||
const mockFile = { name: 'name' + i, size: 12345, url: v }
|
||||
this.options.addedfile.call(this, mockFile)
|
||||
this.options.thumbnail.call(this, mockFile, v)
|
||||
mockFile.previewElement.classList.add('dz-success')
|
||||
mockFile.previewElement.classList.add('dz-complete')
|
||||
vm.initOnce = false
|
||||
return true
|
||||
})
|
||||
} else {
|
||||
const mockFile = { name: 'name', size: 12345, url: val }
|
||||
this.options.addedfile.call(this, mockFile)
|
||||
this.options.thumbnail.call(this, mockFile, val)
|
||||
mockFile.previewElement.classList.add('dz-success')
|
||||
mockFile.previewElement.classList.add('dz-complete')
|
||||
vm.initOnce = false
|
||||
}
|
||||
},
|
||||
accept: (file, done) => {
|
||||
/* 七牛*/
|
||||
// const token = this.$store.getters.token;
|
||||
// getToken(token).then(response => {
|
||||
// file.token = response.data.qiniu_token;
|
||||
// file.key = response.data.qiniu_key;
|
||||
// file.url = response.data.qiniu_url;
|
||||
// done();
|
||||
// })
|
||||
done()
|
||||
},
|
||||
sending: (file, xhr, formData) => {
|
||||
// formData.append('token', file.token);
|
||||
// formData.append('key', file.key);
|
||||
vm.initOnce = false
|
||||
}
|
||||
})
|
||||
|
||||
if (this.couldPaste) {
|
||||
document.addEventListener('paste', this.pasteImg)
|
||||
}
|
||||
|
||||
this.dropzone.on('success', file => {
|
||||
vm.$emit('dropzone-success', file, vm.dropzone.element)
|
||||
})
|
||||
this.dropzone.on('addedfile', file => {
|
||||
vm.$emit('dropzone-fileAdded', file)
|
||||
})
|
||||
this.dropzone.on('removedfile', file => {
|
||||
vm.$emit('dropzone-removedFile', file)
|
||||
})
|
||||
this.dropzone.on('error', (file, error, xhr) => {
|
||||
vm.$emit('dropzone-error', file, error, xhr)
|
||||
})
|
||||
this.dropzone.on('successmultiple', (file, error, xhr) => {
|
||||
vm.$emit('dropzone-successmultiple', file, error, xhr)
|
||||
})
|
||||
},
|
||||
destroyed() {
|
||||
document.removeEventListener('paste', this.pasteImg)
|
||||
this.dropzone.destroy()
|
||||
},
|
||||
methods: {
|
||||
removeAllFiles() {
|
||||
this.dropzone.removeAllFiles(true)
|
||||
},
|
||||
processQueue() {
|
||||
this.dropzone.processQueue()
|
||||
},
|
||||
pasteImg(event) {
|
||||
const items = (event.clipboardData || event.originalEvent.clipboardData).items
|
||||
if (items[0].kind === 'file') {
|
||||
this.dropzone.addFile(items[0].getAsFile())
|
||||
}
|
||||
},
|
||||
initImages(val) {
|
||||
if (!val) return
|
||||
if (Array.isArray(val)) {
|
||||
val.map((v, i) => {
|
||||
const mockFile = { name: 'name' + i, size: 12345, url: v }
|
||||
this.dropzone.options.addedfile.call(this.dropzone, mockFile)
|
||||
this.dropzone.options.thumbnail.call(this.dropzone, mockFile, v)
|
||||
mockFile.previewElement.classList.add('dz-success')
|
||||
mockFile.previewElement.classList.add('dz-complete')
|
||||
return true
|
||||
})
|
||||
} else {
|
||||
const mockFile = { name: 'name', size: 12345, url: val }
|
||||
this.dropzone.options.addedfile.call(this.dropzone, mockFile)
|
||||
this.dropzone.options.thumbnail.call(this.dropzone, mockFile, val)
|
||||
mockFile.previewElement.classList.add('dz-success')
|
||||
mockFile.previewElement.classList.add('dz-complete')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dropzone {
|
||||
border: 2px solid #E5E5E5;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
color: #777;
|
||||
transition: background-color .2s linear;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.dropzone:hover {
|
||||
background-color: #F6F6F6;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #CCC;
|
||||
}
|
||||
|
||||
.dropzone .dz-image img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.dropzone input[name='file'] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dropzone .dz-preview .dz-image {
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.dropzone .dz-preview:hover .dz-image img {
|
||||
transform: none;
|
||||
filter: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.dropzone .dz-preview .dz-details {
|
||||
bottom: 0px;
|
||||
top: 0px;
|
||||
color: white;
|
||||
background-color: rgba(33, 150, 243, 0.8);
|
||||
transition: opacity .2s linear;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dropzone .dz-preview .dz-details .dz-filename:hover span {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dropzone .dz-preview .dz-remove {
|
||||
position: absolute;
|
||||
z-index: 30;
|
||||
color: white;
|
||||
margin-left: 15px;
|
||||
padding: 10px;
|
||||
top: inherit;
|
||||
bottom: 15px;
|
||||
border: 2px white solid;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: 1.1px;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.dropzone .dz-preview:hover .dz-remove {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark {
|
||||
margin-left: -40px;
|
||||
margin-top: -50px;
|
||||
}
|
||||
|
||||
.dropzone .dz-preview .dz-success-mark i, .dropzone .dz-preview .dz-error-mark i {
|
||||
color: white;
|
||||
font-size: 5rem;
|
||||
}
|
||||
</style>
|
||||
@@ -498,6 +498,7 @@ export const selectComponents = [
|
||||
__slot__: {
|
||||
'list-type': true
|
||||
},
|
||||
accept: '',
|
||||
// headers: { 'Authori-zation': getToken() },
|
||||
// data: { model: 'product', pid: 0 },
|
||||
// action: SettingMer.apiBaseURL + 'admin/upload/image?model=product&pid=0',
|
||||
@@ -520,22 +521,22 @@ export const selectComponents = [
|
||||
required: true,
|
||||
span: 24,
|
||||
showTip: false,
|
||||
buttonText: '点击上传',
|
||||
buttonText: '',
|
||||
regList: [],
|
||||
changeTag: true,
|
||||
fileSize: 2,
|
||||
sizeUnit: 'MB',
|
||||
// fileSize: 2,
|
||||
// sizeUnit: 'MB',
|
||||
document: 'https://element.eleme.cn/#/zh-CN/component/upload'
|
||||
},
|
||||
__slot__: {
|
||||
'list-type': true
|
||||
},
|
||||
action: 'https://jsonplaceholder.typicode.com/posts/',
|
||||
// action: 'https://jsonplaceholder.typicode.com/posts/',
|
||||
disabled: true,
|
||||
accept: '',
|
||||
accept: 'image',
|
||||
name: 'file',
|
||||
'auto-upload': true,
|
||||
'list-type': 'text',
|
||||
// 'auto-upload': true,
|
||||
// 'list-type': 'text',
|
||||
multiple: false
|
||||
},
|
||||
{
|
||||
|
||||
@@ -219,14 +219,16 @@
|
||||
<el-form-item v-if="activeData.name !== undefined" label="文件字段名">
|
||||
<el-input v-model="activeData.name" placeholder="请输入上传文件字段名" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="activeData.accept !== undefined" label="文件类型">
|
||||
<el-form-item v-if="activeData.accept === 'image'" label="文件类型">
|
||||
<span>图片</span>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="activeData.accept !== undefined && activeData.accept !== 'image'" label="文件类型">
|
||||
<el-select
|
||||
v-model="activeData.accept"
|
||||
placeholder="请选择文件类型"
|
||||
:style="{ width: '100%' }"
|
||||
clearable
|
||||
>
|
||||
<el-option label="图片" value="image/*" />
|
||||
<el-option label="视频" value="video/*" />
|
||||
<el-option label="音频" value="audio/*" />
|
||||
<el-option label="excel" value=".xls,.xlsx" />
|
||||
@@ -619,6 +621,7 @@ import {
|
||||
inputComponents, selectComponents, layoutComponents
|
||||
} from '@/components/FormGenerator/components/generator/config'
|
||||
import { saveFormConf } from '../utils/db'
|
||||
import Templates from "../../../views/appSetting/wxAccount/wxTemplate/index";
|
||||
|
||||
const dateTimeFormat = {
|
||||
date: 'yyyy-MM-dd',
|
||||
@@ -633,6 +636,7 @@ const dateTimeFormat = {
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Templates,
|
||||
TreeNodeDialog,
|
||||
IconsDialog
|
||||
},
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
<template>
|
||||
<div class="json-editor">
|
||||
<textarea ref="textarea" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CodeMirror from 'codemirror'
|
||||
import 'codemirror/addon/lint/lint.css'
|
||||
import 'codemirror/lib/codemirror.css'
|
||||
import 'codemirror/theme/rubyblue.css'
|
||||
require('script-loader!jsonlint')
|
||||
import 'codemirror/mode/javascript/javascript'
|
||||
import 'codemirror/addon/lint/lint'
|
||||
import 'codemirror/addon/lint/json-lint'
|
||||
|
||||
export default {
|
||||
name: 'JsonEditor',
|
||||
/* eslint-disable vue/require-prop-types */
|
||||
props: ['value'],
|
||||
data() {
|
||||
return {
|
||||
jsonEditor: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(value) {
|
||||
const editorValue = this.jsonEditor.getValue()
|
||||
if (value !== editorValue) {
|
||||
this.jsonEditor.setValue(JSON.stringify(this.value, null, 2))
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.jsonEditor = CodeMirror.fromTextArea(this.$refs.textarea, {
|
||||
lineNumbers: true,
|
||||
mode: 'application/json',
|
||||
gutters: ['CodeMirror-lint-markers'],
|
||||
theme: 'rubyblue',
|
||||
lint: true
|
||||
})
|
||||
|
||||
this.jsonEditor.setValue(JSON.stringify(this.value, null, 2))
|
||||
this.jsonEditor.on('change', cm => {
|
||||
this.$emit('changed', cm.getValue())
|
||||
this.$emit('input', cm.getValue())
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getValue() {
|
||||
return this.jsonEditor.getValue()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.json-editor{
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.json-editor >>> .CodeMirror {
|
||||
height: auto;
|
||||
min-height: 300px;
|
||||
}
|
||||
.json-editor >>> .CodeMirror-scroll{
|
||||
min-height: 300px;
|
||||
}
|
||||
.json-editor >>> .cm-s-rubyblue span.cm-string {
|
||||
color: #F08047;
|
||||
}
|
||||
</style>
|
||||
@@ -1,360 +0,0 @@
|
||||
<template>
|
||||
<div :class="computedClasses" class="material-input__component">
|
||||
<div :class="{iconClass:icon}">
|
||||
<i v-if="icon" :class="['el-icon-' + icon]" class="el-input__icon material-input__icon" />
|
||||
<input
|
||||
v-if="type === 'email'"
|
||||
v-model="currentValue"
|
||||
:name="name"
|
||||
:placeholder="fillPlaceHolder"
|
||||
:readonly="readonly"
|
||||
:disabled="disabled"
|
||||
:autocomplete="autoComplete"
|
||||
:required="required"
|
||||
type="email"
|
||||
class="material-input"
|
||||
@focus="handleMdFocus"
|
||||
@blur="handleMdBlur"
|
||||
@input="handleModelInput"
|
||||
>
|
||||
<input
|
||||
v-if="type === 'url'"
|
||||
v-model="currentValue"
|
||||
:name="name"
|
||||
:placeholder="fillPlaceHolder"
|
||||
:readonly="readonly"
|
||||
:disabled="disabled"
|
||||
:autocomplete="autoComplete"
|
||||
:required="required"
|
||||
type="url"
|
||||
class="material-input"
|
||||
@focus="handleMdFocus"
|
||||
@blur="handleMdBlur"
|
||||
@input="handleModelInput"
|
||||
>
|
||||
<input
|
||||
v-if="type === 'number'"
|
||||
v-model="currentValue"
|
||||
:name="name"
|
||||
:placeholder="fillPlaceHolder"
|
||||
:step="step"
|
||||
:readonly="readonly"
|
||||
:disabled="disabled"
|
||||
:autocomplete="autoComplete"
|
||||
:max="max"
|
||||
:min="min"
|
||||
:minlength="minlength"
|
||||
:maxlength="maxlength"
|
||||
:required="required"
|
||||
type="number"
|
||||
class="material-input"
|
||||
@focus="handleMdFocus"
|
||||
@blur="handleMdBlur"
|
||||
@input="handleModelInput"
|
||||
>
|
||||
<input
|
||||
v-if="type === 'password'"
|
||||
v-model="currentValue"
|
||||
:name="name"
|
||||
:placeholder="fillPlaceHolder"
|
||||
:readonly="readonly"
|
||||
:disabled="disabled"
|
||||
:autocomplete="autoComplete"
|
||||
:max="max"
|
||||
:min="min"
|
||||
:required="required"
|
||||
type="password"
|
||||
class="material-input"
|
||||
@focus="handleMdFocus"
|
||||
@blur="handleMdBlur"
|
||||
@input="handleModelInput"
|
||||
>
|
||||
<input
|
||||
v-if="type === 'tel'"
|
||||
v-model="currentValue"
|
||||
:name="name"
|
||||
:placeholder="fillPlaceHolder"
|
||||
:readonly="readonly"
|
||||
:disabled="disabled"
|
||||
:autocomplete="autoComplete"
|
||||
:required="required"
|
||||
type="tel"
|
||||
class="material-input"
|
||||
@focus="handleMdFocus"
|
||||
@blur="handleMdBlur"
|
||||
@input="handleModelInput"
|
||||
>
|
||||
<input
|
||||
v-if="type === 'text'"
|
||||
v-model="currentValue"
|
||||
:name="name"
|
||||
:placeholder="fillPlaceHolder"
|
||||
:readonly="readonly"
|
||||
:disabled="disabled"
|
||||
:autocomplete="autoComplete"
|
||||
:minlength="minlength"
|
||||
:maxlength="maxlength"
|
||||
:required="required"
|
||||
type="text"
|
||||
class="material-input"
|
||||
@focus="handleMdFocus"
|
||||
@blur="handleMdBlur"
|
||||
@input="handleModelInput"
|
||||
>
|
||||
<span class="material-input-bar" />
|
||||
<label class="material-label">
|
||||
<slot />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// source:https://github.com/wemake-services/vue-material-input/blob/master/src/components/MaterialInput.vue
|
||||
|
||||
export default {
|
||||
name: 'MdInput',
|
||||
props: {
|
||||
/* eslint-disable */
|
||||
icon: String,
|
||||
name: String,
|
||||
type: {
|
||||
type: String,
|
||||
default: 'text'
|
||||
},
|
||||
value: [String, Number],
|
||||
placeholder: String,
|
||||
readonly: Boolean,
|
||||
disabled: Boolean,
|
||||
min: String,
|
||||
max: String,
|
||||
step: String,
|
||||
minlength: Number,
|
||||
maxlength: Number,
|
||||
required: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
autoComplete: {
|
||||
type: String,
|
||||
default: 'off'
|
||||
},
|
||||
validateEvent: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentValue: this.value,
|
||||
focus: false,
|
||||
fillPlaceHolder: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
computedClasses() {
|
||||
return {
|
||||
'material--active': this.focus,
|
||||
'material--disabled': this.disabled,
|
||||
'material--raised': Boolean(this.focus || this.currentValue) // has value
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(newValue) {
|
||||
this.currentValue = newValue
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleModelInput(event) {
|
||||
const value = event.target.value
|
||||
this.$emit('input', value)
|
||||
if (this.$parent.$options.componentName === 'ElFormItem') {
|
||||
if (this.validateEvent) {
|
||||
this.$parent.$emit('el.form.change', [value])
|
||||
}
|
||||
}
|
||||
this.$emit('change', value)
|
||||
},
|
||||
handleMdFocus(event) {
|
||||
this.focus = true
|
||||
this.$emit('focus', event)
|
||||
if (this.placeholder && this.placeholder !== '') {
|
||||
this.fillPlaceHolder = this.placeholder
|
||||
}
|
||||
},
|
||||
handleMdBlur(event) {
|
||||
this.focus = false
|
||||
this.$emit('blur', event)
|
||||
this.fillPlaceHolder = null
|
||||
if (this.$parent.$options.componentName === 'ElFormItem') {
|
||||
if (this.validateEvent) {
|
||||
this.$parent.$emit('el.form.blur', [this.currentValue])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// Fonts:
|
||||
$font-size-base: 16px;
|
||||
$font-size-small: 18px;
|
||||
$font-size-smallest: 12px;
|
||||
$font-weight-normal: normal;
|
||||
$font-weight-bold: bold;
|
||||
$apixel: 1px;
|
||||
// Utils
|
||||
$spacer: 12px;
|
||||
$transition: 0.2s ease all;
|
||||
$index: 0px;
|
||||
$index-has-icon: 30px;
|
||||
// Theme:
|
||||
$color-white: white;
|
||||
$color-grey: #9E9E9E;
|
||||
$color-grey-light: #E0E0E0;
|
||||
$color-blue: #2196F3;
|
||||
$color-red: #F44336;
|
||||
$color-black: black;
|
||||
// Base clases:
|
||||
%base-bar-pseudo {
|
||||
content: '';
|
||||
height: 1px;
|
||||
width: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
transition: $transition;
|
||||
}
|
||||
|
||||
// Mixins:
|
||||
@mixin slided-top() {
|
||||
top: - ($font-size-base + $spacer);
|
||||
left: 0;
|
||||
font-size: $font-size-base;
|
||||
font-weight: $font-weight-bold;
|
||||
}
|
||||
|
||||
// Component:
|
||||
.material-input__component {
|
||||
margin-top: 36px;
|
||||
position: relative;
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.iconClass {
|
||||
.material-input__icon {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
line-height: $font-size-base;
|
||||
color: $color-blue;
|
||||
top: $spacer;
|
||||
width: $index-has-icon;
|
||||
height: $font-size-base;
|
||||
font-size: $font-size-base;
|
||||
font-weight: $font-weight-normal;
|
||||
pointer-events: none;
|
||||
}
|
||||
.material-label {
|
||||
left: $index-has-icon;
|
||||
}
|
||||
.material-input {
|
||||
text-indent: $index-has-icon;
|
||||
}
|
||||
}
|
||||
.material-input {
|
||||
font-size: $font-size-base;
|
||||
padding: $spacer $spacer $spacer - $apixel * 10 $spacer / 2;
|
||||
display: block;
|
||||
width: 100%;
|
||||
border: none;
|
||||
line-height: 1;
|
||||
border-radius: 0;
|
||||
&:focus {
|
||||
outline: none;
|
||||
border: none;
|
||||
border-bottom: 1px solid transparent; // fixes the height issue
|
||||
}
|
||||
}
|
||||
.material-label {
|
||||
font-weight: $font-weight-normal;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
left: $index;
|
||||
top: 0;
|
||||
transition: $transition;
|
||||
font-size: $font-size-small;
|
||||
}
|
||||
.material-input-bar {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
&:before {
|
||||
@extend %base-bar-pseudo;
|
||||
left: 50%;
|
||||
}
|
||||
&:after {
|
||||
@extend %base-bar-pseudo;
|
||||
right: 50%;
|
||||
}
|
||||
}
|
||||
// Disabled state:
|
||||
&.material--disabled {
|
||||
.material-input {
|
||||
border-bottom-style: dashed;
|
||||
}
|
||||
}
|
||||
// Raised state:
|
||||
&.material--raised {
|
||||
.material-label {
|
||||
@include slided-top();
|
||||
}
|
||||
}
|
||||
// Active state:
|
||||
&.material--active {
|
||||
.material-input-bar {
|
||||
&:before,
|
||||
&:after {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.material-input__component {
|
||||
background: $color-white;
|
||||
.material-input {
|
||||
background: none;
|
||||
color: $color-black;
|
||||
text-indent: $index;
|
||||
border-bottom: 1px solid $color-grey-light;
|
||||
}
|
||||
.material-label {
|
||||
color: $color-grey;
|
||||
}
|
||||
.material-input-bar {
|
||||
&:before,
|
||||
&:after {
|
||||
background: $color-blue;
|
||||
}
|
||||
}
|
||||
// Active state:
|
||||
&.material--active {
|
||||
.material-label {
|
||||
color: $color-blue;
|
||||
}
|
||||
}
|
||||
// Errors:
|
||||
&.material--has-errors {
|
||||
&.material--active .material-label {
|
||||
color: $color-red;
|
||||
}
|
||||
.material-input-bar {
|
||||
&:before,
|
||||
&:after {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,31 +0,0 @@
|
||||
// doc: https://nhnent.github.io/tui.editor/api/latest/ToastUIEditor.html#ToastUIEditor
|
||||
export default {
|
||||
minHeight: '200px',
|
||||
previewStyle: 'vertical',
|
||||
useCommandShortcut: true,
|
||||
useDefaultHTMLSanitizer: true,
|
||||
usageStatistics: false,
|
||||
hideModeSwitch: false,
|
||||
toolbarItems: [
|
||||
'heading',
|
||||
'bold',
|
||||
'italic',
|
||||
'strike',
|
||||
'divider',
|
||||
'hr',
|
||||
'quote',
|
||||
'divider',
|
||||
'ul',
|
||||
'ol',
|
||||
'task',
|
||||
'indent',
|
||||
'outdent',
|
||||
'divider',
|
||||
'table',
|
||||
'image',
|
||||
'link',
|
||||
'divider',
|
||||
'code',
|
||||
'codeblock'
|
||||
]
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
<template>
|
||||
<div :id="id" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// deps for editor
|
||||
import 'codemirror/lib/codemirror.css' // codemirror
|
||||
import 'tui-editor/dist/tui-editor.css' // editor ui
|
||||
import 'tui-editor/dist/tui-editor-contents.css' // editor content
|
||||
|
||||
import Editor from 'tui-editor'
|
||||
import defaultOptions from './default-options'
|
||||
|
||||
export default {
|
||||
name: 'MarkdownEditor',
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
required: false,
|
||||
default() {
|
||||
return 'markdown-editor-' + +new Date() + ((Math.random() * 1000).toFixed(0) + '')
|
||||
}
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default() {
|
||||
return defaultOptions
|
||||
}
|
||||
},
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'markdown'
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '300px'
|
||||
},
|
||||
language: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'en_US' // https://github.com/nhnent/tui.editor/tree/master/src/js/langs
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editor: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
editorOptions() {
|
||||
const options = Object.assign({}, defaultOptions, this.options)
|
||||
options.initialEditType = this.mode
|
||||
options.height = this.height
|
||||
options.language = this.language
|
||||
return options
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(newValue, preValue) {
|
||||
if (newValue !== preValue && newValue !== this.editor.getValue()) {
|
||||
this.editor.setValue(newValue)
|
||||
}
|
||||
},
|
||||
language(val) {
|
||||
this.destroyEditor()
|
||||
this.initEditor()
|
||||
},
|
||||
height(newValue) {
|
||||
this.editor.height(newValue)
|
||||
},
|
||||
mode(newValue) {
|
||||
this.editor.changeMode(newValue)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initEditor()
|
||||
},
|
||||
destroyed() {
|
||||
this.destroyEditor()
|
||||
},
|
||||
methods: {
|
||||
initEditor() {
|
||||
this.editor = new Editor({
|
||||
el: document.getElementById(this.id),
|
||||
...this.editorOptions
|
||||
})
|
||||
if (this.value) {
|
||||
this.editor.setValue(this.value)
|
||||
}
|
||||
this.editor.on('change', () => {
|
||||
this.$emit('input', this.editor.getValue())
|
||||
})
|
||||
},
|
||||
destroyEditor() {
|
||||
if (!this.editor) return
|
||||
this.editor.off('change')
|
||||
this.editor.remove()
|
||||
},
|
||||
setValue(value) {
|
||||
this.editor.setValue(value)
|
||||
},
|
||||
getValue() {
|
||||
return this.editor.getValue()
|
||||
},
|
||||
setHtml(value) {
|
||||
this.editor.setHtml(value)
|
||||
},
|
||||
getHtml() {
|
||||
return this.editor.getHtml()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,134 +0,0 @@
|
||||
<template>
|
||||
<div class="upload-container">
|
||||
<el-upload
|
||||
:data="dataObj"
|
||||
:multiple="false"
|
||||
:show-file-list="false"
|
||||
:on-success="handleImageSuccess"
|
||||
class="image-uploader"
|
||||
drag
|
||||
action="https://httpbin.org/post"
|
||||
>
|
||||
<i class="el-icon-upload" />
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或<em>点击上传</em>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div class="image-preview">
|
||||
<div v-show="imageUrl.length>1" class="image-preview-wrapper">
|
||||
<img :src="imageUrl+'?imageView2/1/w/200/h/200'">
|
||||
<div class="image-preview-action">
|
||||
<i class="el-icon-delete" @click="rmImage" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getToken } from '@/api/qiniu'
|
||||
|
||||
export default {
|
||||
name: 'SingleImageUpload',
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempUrl: '',
|
||||
dataObj: { token: '', key: '' }
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imageUrl() {
|
||||
return this.value
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
rmImage() {
|
||||
this.emitInput('')
|
||||
},
|
||||
emitInput(val) {
|
||||
this.$emit('input', val)
|
||||
},
|
||||
handleImageSuccess() {
|
||||
this.emitInput(this.tempUrl)
|
||||
},
|
||||
beforeUpload() {
|
||||
const _self = this
|
||||
return new Promise((resolve, reject) => {
|
||||
getToken().then(response => {
|
||||
const key = response.data.qiniu_key
|
||||
const token = response.data.qiniu_token
|
||||
_self._data.dataObj.token = token
|
||||
_self._data.dataObj.key = key
|
||||
this.tempUrl = response.data.qiniu_url
|
||||
resolve(true)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
reject(false)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/mixin.scss";
|
||||
.upload-container {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
@include clearfix;
|
||||
.image-uploader {
|
||||
width: 60%;
|
||||
float: left;
|
||||
}
|
||||
.image-preview {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
position: relative;
|
||||
border: 1px dashed #d9d9d9;
|
||||
float: left;
|
||||
margin-left: 50px;
|
||||
.image-preview-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.image-preview-action {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
cursor: default;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
opacity: 0;
|
||||
font-size: 20px;
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
transition: opacity .3s;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
line-height: 200px;
|
||||
.el-icon-delete {
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
.image-preview-action {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,130 +0,0 @@
|
||||
<template>
|
||||
<div class="singleImageUpload2 upload-container">
|
||||
<el-upload
|
||||
:data="dataObj"
|
||||
:multiple="false"
|
||||
:show-file-list="false"
|
||||
:on-success="handleImageSuccess"
|
||||
class="image-uploader"
|
||||
drag
|
||||
action="https://httpbin.org/post"
|
||||
>
|
||||
<i class="el-icon-upload" />
|
||||
<div class="el-upload__text">
|
||||
Drag或<em>点击上传</em>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div v-show="imageUrl.length>0" class="image-preview">
|
||||
<div v-show="imageUrl.length>1" class="image-preview-wrapper">
|
||||
<img :src="imageUrl">
|
||||
<div class="image-preview-action">
|
||||
<i class="el-icon-delete" @click="rmImage" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getToken } from '@/api/qiniu'
|
||||
|
||||
export default {
|
||||
name: 'SingleImageUpload2',
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempUrl: '',
|
||||
dataObj: { token: '', key: '' }
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imageUrl() {
|
||||
return this.value
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
rmImage() {
|
||||
this.emitInput('')
|
||||
},
|
||||
emitInput(val) {
|
||||
this.$emit('input', val)
|
||||
},
|
||||
handleImageSuccess() {
|
||||
this.emitInput(this.tempUrl)
|
||||
},
|
||||
beforeUpload() {
|
||||
const _self = this
|
||||
return new Promise((resolve, reject) => {
|
||||
getToken().then(response => {
|
||||
const key = response.data.qiniu_key
|
||||
const token = response.data.qiniu_token
|
||||
_self._data.dataObj.token = token
|
||||
_self._data.dataObj.key = key
|
||||
this.tempUrl = response.data.qiniu_url
|
||||
resolve(true)
|
||||
}).catch(() => {
|
||||
reject(false)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.upload-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
.image-uploader {
|
||||
height: 100%;
|
||||
}
|
||||
.image-preview {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
border: 1px dashed #d9d9d9;
|
||||
.image-preview-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.image-preview-action {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
cursor: default;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
opacity: 0;
|
||||
font-size: 20px;
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
transition: opacity .3s;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
line-height: 200px;
|
||||
.el-icon-delete {
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
.image-preview-action {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,157 +0,0 @@
|
||||
<template>
|
||||
<div class="upload-container">
|
||||
<el-upload
|
||||
:data="dataObj"
|
||||
:multiple="false"
|
||||
:show-file-list="false"
|
||||
:on-success="handleImageSuccess"
|
||||
class="image-uploader"
|
||||
drag
|
||||
action="https://httpbin.org/post"
|
||||
>
|
||||
<i class="el-icon-upload" />
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或<em>点击上传</em>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div class="image-preview image-app-preview">
|
||||
<div v-show="imageUrl.length>1" class="image-preview-wrapper">
|
||||
<img :src="imageUrl">
|
||||
<div class="image-preview-action">
|
||||
<i class="el-icon-delete" @click="rmImage" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="image-preview">
|
||||
<div v-show="imageUrl.length>1" class="image-preview-wrapper">
|
||||
<img :src="imageUrl">
|
||||
<div class="image-preview-action">
|
||||
<i class="el-icon-delete" @click="rmImage" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getToken } from '@/api/qiniu'
|
||||
|
||||
export default {
|
||||
name: 'SingleImageUpload3',
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tempUrl: '',
|
||||
dataObj: { token: '', key: '' }
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
imageUrl() {
|
||||
return this.value
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
rmImage() {
|
||||
this.emitInput('')
|
||||
},
|
||||
emitInput(val) {
|
||||
this.$emit('input', val)
|
||||
},
|
||||
handleImageSuccess(file) {
|
||||
this.emitInput(file.files.file)
|
||||
},
|
||||
beforeUpload() {
|
||||
const _self = this
|
||||
return new Promise((resolve, reject) => {
|
||||
getToken().then(response => {
|
||||
const key = response.data.qiniu_key
|
||||
const token = response.data.qiniu_token
|
||||
_self._data.dataObj.token = token
|
||||
_self._data.dataObj.key = key
|
||||
this.tempUrl = response.data.qiniu_url
|
||||
resolve(true)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
reject(false)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/mixin.scss";
|
||||
.upload-container {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
@include clearfix;
|
||||
.image-uploader {
|
||||
width: 35%;
|
||||
float: left;
|
||||
}
|
||||
.image-preview {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
position: relative;
|
||||
border: 1px dashed #d9d9d9;
|
||||
float: left;
|
||||
margin-left: 50px;
|
||||
.image-preview-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.image-preview-action {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
cursor: default;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
opacity: 0;
|
||||
font-size: 20px;
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
transition: opacity .3s;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
line-height: 200px;
|
||||
.el-icon-delete {
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
.image-preview-action {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.image-app-preview {
|
||||
width: 320px;
|
||||
height: 180px;
|
||||
position: relative;
|
||||
border: 1px dashed #d9d9d9;
|
||||
float: left;
|
||||
margin-left: 50px;
|
||||
.app-fake-conver {
|
||||
height: 44px;
|
||||
position: absolute;
|
||||
width: 100%; // background: rgba(0, 0, 0, .1);
|
||||
text-align: center;
|
||||
line-height: 64px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -17,7 +17,6 @@
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fileFileApi } from '@/api/systemSetting'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
{{multiple}}
|
||||
<div class="acea-row" v-if="multiple">
|
||||
<div
|
||||
v-for="(item,index) in imageList"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
title="上传图片"
|
||||
:visible.sync="visible"
|
||||
width="896px"
|
||||
:modal="false"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<upload-index v-if="visible" :isMore="isMore" :modelName="modelName" @getImage="getImage" />
|
||||
|
||||
@@ -2,81 +2,101 @@
|
||||
<div class="sidebar-logo-container" :class="{'collapse':collapse}">
|
||||
<transition name="sidebarLogoFade">
|
||||
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo">
|
||||
<h1 v-else class="sidebar-title">{{ title }} </h1>
|
||||
<img v-if="logoSmall" :src="logoSmall" class="sidebar-logo-small">
|
||||
</router-link>
|
||||
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo">
|
||||
<h1 class="sidebar-title">{{ title }} </h1>
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo-big">
|
||||
</router-link>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'SidebarLogo',
|
||||
props: {
|
||||
collapse: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: 'Vue Element Admin',
|
||||
logo: 'https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png'
|
||||
import * as systemConfigApi from '@/api/systemConfig.js'
|
||||
export default {
|
||||
name: 'SidebarLogo',
|
||||
props: {
|
||||
collapse: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: 'Vue Element Admin',
|
||||
logo: '',
|
||||
logoSmall: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getLogo()
|
||||
this.getSquareLogo()
|
||||
},
|
||||
methods: {
|
||||
getLogo() {
|
||||
systemConfigApi.configGetUniq({key: "site_logo"}).then(data => {
|
||||
this.logo = data
|
||||
})
|
||||
},
|
||||
getSquareLogo() {
|
||||
systemConfigApi.configGetUniq({key: "site_logo_square"}).then(data => {
|
||||
this.logoSmall = data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sidebarLogoFade-enter-active {
|
||||
transition: opacity 1.5s;
|
||||
}
|
||||
.sidebarLogoFade-enter-active {
|
||||
transition: opacity 1.5s;
|
||||
}
|
||||
.sidebar-logo-big{
|
||||
width: auto;
|
||||
height: 40px;
|
||||
vertical-align: middle;
|
||||
margin-right: 12px;
|
||||
}
|
||||
.sidebarLogoFade-enter,
|
||||
.sidebarLogoFade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.sidebarLogoFade-enter,
|
||||
.sidebarLogoFade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.sidebar-logo-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
background: #2b2f3a;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
|
||||
& .sidebar-logo-link {
|
||||
height: 100%;
|
||||
.sidebar-logo-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 65px;
|
||||
line-height: 65px;
|
||||
background: #2b2f3a;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
|
||||
& .sidebar-logo {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
margin-right: 12px;
|
||||
& .sidebar-logo-link {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
& .sidebar-logo-small {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
& .sidebar-title {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
font-size: 14px;
|
||||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
& .sidebar-title {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
font-size: 14px;
|
||||
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
|
||||
vertical-align: middle;
|
||||
&.collapse {
|
||||
.sidebar-logo {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.collapse {
|
||||
.sidebar-logo {
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
:collapse="isCollapse"
|
||||
:background-color="variables.menuBg"
|
||||
:text-color="variables.menuText"
|
||||
:unique-opened="false"
|
||||
:unique-opened="true"
|
||||
:active-text-color="variables.menuActiveText"
|
||||
:collapse-transition="false"
|
||||
mode="vertical"
|
||||
|
||||
@@ -216,7 +216,7 @@ export const constantRoutes = [
|
||||
path: 'dashboard',
|
||||
component: () => import('@/views/dashboard/index'),
|
||||
name: 'Dashboard',
|
||||
meta: { title: '主页', icon: 'dashboard', affix: true }
|
||||
meta: { title: '控制台', icon: 'dashboard', affix: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@ module.exports = {
|
||||
* @type {boolean} true | false
|
||||
* @description Whether show the logo in sidebar
|
||||
*/
|
||||
sidebarLogo: false,
|
||||
sidebarLogo: true,
|
||||
|
||||
/**
|
||||
* @type {string | array} 'production' | ['production', 'development']
|
||||
|
||||
@@ -334,11 +334,11 @@ table .el-image{
|
||||
|
||||
//富文本编辑器弹框
|
||||
.edui-shadow{
|
||||
z-index: -1 !important;
|
||||
//z-index: -1 !important;
|
||||
}
|
||||
.edui-default{
|
||||
z-index: 4000;
|
||||
//z-index: 4000;
|
||||
}
|
||||
.edui-dialog{
|
||||
z-index: 4009 !important;
|
||||
//z-index: 4009 !important;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
export const page = {
|
||||
limit: [10, 15, 20, 50, 100],
|
||||
limit: [20, 40, 60, 80, 100],
|
||||
page: 1,
|
||||
layout: 'total, sizes, prev, pager, next, jumper'
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<script>
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { replySaveApi, replyEditApi, replyInfoApi, replyListApi, keywordsInfoApi, replyUpdateApi } from '@/api/wxApi'
|
||||
import { fileImageApi } from '@/api/systemSetting'
|
||||
import { wechatUploadApi } from '@/api/systemSetting'
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: { },
|
||||
@@ -278,7 +278,7 @@ export default {
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
fileImageApi(formData, {type: this.formValidate.type === 'image'?'image':'voice'}).then(res => {
|
||||
wechatUploadApi(formData, {type: this.formValidate.type === 'image'?'image':'voice'}).then(res => {
|
||||
loading.close()
|
||||
this.formValidate.contents.mediaId = res.mediaId
|
||||
this.formValidate.contents.srcUrl = res.url
|
||||
|
||||
@@ -145,12 +145,12 @@ export default {
|
||||
},
|
||||
hadlerInitEditData() {
|
||||
if (this.isEdit !== 1) return
|
||||
const { author, cid, content, imageInput,
|
||||
const { author, cid, content, imageInputs,
|
||||
isBanner, isHot, shareSynopsis, shareTitle, sort, synopsis, title, url, id } = this.editData
|
||||
this.pram.author = author
|
||||
this.pram.cid = Number.parseInt(cid)
|
||||
this.pram.content = content
|
||||
this.pram.imageInput = imageInput
|
||||
this.pram.imageInput = imageInputs
|
||||
this.pram.isBanner = isBanner
|
||||
this.pram.isHot = isHot
|
||||
this.pram.shareSynopsis = shareSynopsis
|
||||
|
||||
@@ -81,7 +81,9 @@
|
||||
top="1vh"
|
||||
width="80%"
|
||||
destroy-on-close
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
class="articleModal"
|
||||
>
|
||||
<edit
|
||||
v-if="editDialogConfig.visible"
|
||||
@@ -187,6 +189,8 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.articleModal{
|
||||
z-index: 333 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<el-date-picker v-model="timeVal" value-format="yyyy/MM/dd" format="yyyy/MM/dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字:">
|
||||
<el-input v-model="tableFrom.keyword" placeholder="请输入请输入姓名、电话、UID" class="selWidth" size="small">
|
||||
<el-input v-model="tableFrom.keywords" placeholder="请输入请输入姓名、电话、UID" class="selWidth" size="small">
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -283,7 +283,7 @@
|
||||
listLoading: true,
|
||||
tableFrom: {
|
||||
dateLimit: '',
|
||||
keyword: '',
|
||||
keywords: '',
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
@@ -357,7 +357,7 @@
|
||||
// 具体日期
|
||||
onchangeTimeSpread(e) {
|
||||
this.timeValSpread = e
|
||||
this.tableFrom.dateLimit = e ? this.timeValSpread.join('-') : ''
|
||||
this.tableFrom.dateLimit = e ? this.timeValSpread.join(',') : ''
|
||||
this.onName === 'man' ? this.getListSpread() : this.getSpreadOrderList()
|
||||
},
|
||||
onChanges() {
|
||||
@@ -416,7 +416,7 @@
|
||||
// 具体日期
|
||||
onchangeTime(e) {
|
||||
this.timeVal = e
|
||||
this.tableFrom.dateLimit = e ? this.timeVal.join('-') : ''
|
||||
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : ''
|
||||
this.tableFrom.page = 1
|
||||
this.getList()
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠劵类型">
|
||||
<el-radio-group v-model="ruleForm.useType">
|
||||
<el-radio :label="1">通用卷</el-radio>
|
||||
<el-radio :label="1">通用券</el-radio>
|
||||
<el-radio :label="2">商品券</el-radio>
|
||||
<el-radio :label="3">品类券</el-radio>
|
||||
</el-radio-group>
|
||||
@@ -84,8 +84,8 @@
|
||||
<el-form-item label="领取方式" prop="resource">
|
||||
<el-radio-group v-model="ruleForm.type">
|
||||
<el-radio :label="1">手动领取</el-radio>
|
||||
<el-radio :label="2">新人卷</el-radio>
|
||||
<el-radio :label="3">赠送卷</el-radio>
|
||||
<el-radio :label="2">新人券</el-radio>
|
||||
<el-radio :label="3">赠送券</el-radio>
|
||||
<!--<el-radio :label="4">付费会员卷</el-radio>-->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
@@ -5,19 +5,30 @@
|
||||
<div class="filter-container">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="使用状态:" class="mr10">
|
||||
<el-select v-model="tableFromIssue.status" placeholder="请选择评价状态" clearable class="selWidth" @change="seachList">
|
||||
<el-select v-model="tableFromIssue.status" placeholder="请选择使用状态" clearable class="selWidth" @change="seachList">
|
||||
<el-option label="已使用" value="1" />
|
||||
<el-option label="未使用" value="0" />
|
||||
<el-option label="已过期" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="领取人:" class="mr10">
|
||||
<el-input v-model="tableFromIssue.coupon_id" placeholder="请输入领取人" class="selWidth">
|
||||
<el-button size="mini" slot="append" icon="el-icon-search" @click="seachList"/>
|
||||
</el-input>
|
||||
<el-form-item label="领取人:">
|
||||
<el-select v-model="tableFromIssue.uid" class="selWidth" reserve-keyword remote filterable
|
||||
:remote-method="remoteMethod" :loading="loading" placeholder="请输入用户名称" clearable @change="seachList">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.uid"
|
||||
:label="item.nickname"
|
||||
:value="item.uid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="领取人:" class="mr10">-->
|
||||
<!--<el-input v-model="tableFromIssue.uid" placeholder="请输入领取人" class="selWidth">-->
|
||||
<!--<el-button size="mini" slot="append" icon="el-icon-search" @click="seachList"/>-->
|
||||
<!--</el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="优惠劵:" class="mr10">
|
||||
<el-input v-model="tableFromIssue.name" placeholder="请输入优惠劵" class="selWidth">
|
||||
<el-input v-model="tableFromIssue.name" placeholder="请输入优惠劵" class="selWidth" clearable>
|
||||
<el-button slot="append" icon="el-icon-search" @click="seachList"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -109,6 +120,7 @@
|
||||
<script>
|
||||
import { couponUserListApi } from '@/api/marketing'
|
||||
import { roterPre } from '@/settings'
|
||||
import { userListApi } from '@/api/user'
|
||||
export default {
|
||||
name: 'CouponUser',
|
||||
filters: {
|
||||
@@ -139,19 +151,35 @@
|
||||
tableFromIssue: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
uid: '',
|
||||
name: '',
|
||||
status: ''
|
||||
},
|
||||
issueData: {
|
||||
data: [],
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
loading: false,
|
||||
options: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getIssueList()
|
||||
},
|
||||
methods: {
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
this.loading = true;
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
userListApi({keywords: query, page: 1, limit: 10}).then(res => {
|
||||
this.options = res.list
|
||||
})
|
||||
}, 200);
|
||||
} else {
|
||||
this.options = [];
|
||||
}
|
||||
},
|
||||
seachList() {
|
||||
this.tableFromIssue.page = 1
|
||||
this.getIssueList()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<zb-parser
|
||||
:form-id="109"
|
||||
:form-id="formId"
|
||||
:is-create="isCreate"
|
||||
:edit-data="editData"
|
||||
@submit="handlerSubmit"
|
||||
@@ -13,21 +13,51 @@
|
||||
|
||||
<script>
|
||||
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
|
||||
import { smsSaveApi } from '@/api/sms'
|
||||
import { configSaveForm, configInfo } from '@/api/systemConfig.js'
|
||||
export default {
|
||||
name: "integralconfig",
|
||||
components: { zbParser },
|
||||
data() {
|
||||
return {
|
||||
isCreate: 0,
|
||||
editData: {}
|
||||
editData: {},
|
||||
formId: 109
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getFormInfo()
|
||||
},
|
||||
methods: {
|
||||
handlerSubmit(formValue) {
|
||||
smsSaveApi(formValue).then(data => {
|
||||
this.$message.success('新增成功')
|
||||
this.editData = {}
|
||||
handlerSubmit(data) {
|
||||
const tempArr = []
|
||||
for (var key in data) {
|
||||
const obj = {}
|
||||
obj.name = key
|
||||
obj.title = key
|
||||
obj.value = data[key]
|
||||
tempArr.push(obj)
|
||||
}
|
||||
const _pram = {
|
||||
'fields': tempArr,
|
||||
'id': this.formId,
|
||||
'sort': 0,
|
||||
'status': true
|
||||
}
|
||||
console.log(_pram)
|
||||
configSaveForm(_pram).then(res => {
|
||||
this.getFormInfo()
|
||||
this.$message.success('操作成功')
|
||||
})
|
||||
},
|
||||
// 获取表单详情
|
||||
getFormInfo() {
|
||||
configInfo({ id: this.formId }).then(res => {
|
||||
this.isShow = false
|
||||
this.editData = res
|
||||
this.isCreate = 1
|
||||
setTimeout(() => { // 让表单重复渲染待编辑数据
|
||||
this.isShow = true
|
||||
}, 80)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,22 +92,22 @@
|
||||
/>
|
||||
<el-table-column
|
||||
label="商品信息"
|
||||
min-width="330"
|
||||
min-width="400"
|
||||
>
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<div v-if="scope.row.productList.length">-->
|
||||
<!--<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle">-->
|
||||
<!--<div class="demo-image__preview">-->
|
||||
<!--<el-image-->
|
||||
<!--:src="val.info.productInfo.image"-->
|
||||
<!--:preview-src-list="imgList"-->
|
||||
<!--/>-->
|
||||
<!--</div>-->
|
||||
<!--<!–<span class="tabBox_tit">{{ val.info.productInfo.store_name + ' | ' }}{{ val.info.productInfo.attrInfo.suk ? val.info.productInfo.attrInfo.suk:'-' }}</span>–>-->
|
||||
<!--<!–<span class="tabBox_pice">{{ '¥'+ val.info.productInfo.attrInfo.price ? val.info.productInfo.attrInfo.price:'-' + ' x '+ val.info.cart_num }}</span>–>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<!--</template>-->
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.productList.length">
|
||||
<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
:src="val.info.productInfo.image"
|
||||
:preview-src-list="imgList"
|
||||
/>
|
||||
</div>
|
||||
<span class="tabBox_tit mr10">{{ val.info.productInfo.storeName + ' | ' }}{{ val.info.productInfo.attrInfo.suk ? val.info.productInfo.attrInfo.suk:'-' }}</span>
|
||||
<span class="tabBox_pice">{{ '¥'+ val.info.productInfo.attrInfo.price ? val.info.productInfo.attrInfo.price + ' x '+ val.info.cartNum : '-' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="payPrice"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<el-form-item label="快递公司:" prop="expressId"
|
||||
:rules="[{ required: true, message: '请选择快递公司', trigger: 'change' }]">
|
||||
<el-select v-model="formItem.expressId" style="width:80%;">
|
||||
<el-option v-for="(item,i) in express" :value="item.id" :key="i">{{ item.name }}</el-option>
|
||||
<el-option v-for="(item,i) in express" :value="item.id" :key="i" :label="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="快递单号:" prop="expressCode"
|
||||
@@ -69,7 +69,7 @@
|
||||
},
|
||||
// 物流公司列表
|
||||
getList () {
|
||||
expressList({ page: 1, limit: 999}).then(async res => {
|
||||
expressList({ page: 1, limit: 999, isShow:true }).then(async res => {
|
||||
this.express = res.list
|
||||
})
|
||||
},
|
||||
|
||||
@@ -51,11 +51,8 @@
|
||||
<el-table-column
|
||||
label="发送时间"
|
||||
min-width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.creatTime}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
prop="createTime"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="resultcode"
|
||||
label="状态码"
|
||||
|
||||
@@ -1,43 +1,41 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card v-if="isShowList" v-loading="fullscreenLoading" class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="content acea-row row-middle">
|
||||
<div class="demo-basic--circle acea-row row-middle">
|
||||
<el-avatar :size="50" :src="circleUrl" class="mr20" />
|
||||
<div class="dashboard-workplace-header-tip">
|
||||
<div class="dashboard-workplace-header-tip-title">{{ smsAccount }},祝您每一天开心!</div>
|
||||
<div class="dashboard-workplace-header-tip-desc">
|
||||
<span class="mr10">修改密码</span>
|
||||
<span @click="signOut">退出登录</span>
|
||||
</div>
|
||||
<div class="content acea-row row-middle">
|
||||
<div class="demo-basic--circle acea-row row-middle">
|
||||
<el-avatar :size="50" :src="circleUrl" class="mr20" />
|
||||
<div class="dashboard-workplace-header-tip">
|
||||
<div class="dashboard-workplace-header-tip-title">{{ smsAccount }},祝您每一天开心!</div>
|
||||
<div class="dashboard-workplace-header-tip-desc">
|
||||
<span class="mr10">修改密码</span>
|
||||
<span @click="signOut">退出登录</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-workplace-header-extra">
|
||||
<el-row type="flex" justify="center" align="middle" :gutter="12">
|
||||
<el-col :span="8">
|
||||
</div>
|
||||
<div class="dashboard-workplace-header-extra">
|
||||
<el-row type="flex" justify="center" align="middle" :gutter="12">
|
||||
<el-col :span="8">
|
||||
<span class="pfont acea-row row-middle">
|
||||
<el-avatar icon="el-icon-user-solid" size="small" class="mr10" />
|
||||
<span>剩余条数</span>
|
||||
</span>
|
||||
<span class="rR" v-text="numbers" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="rR" v-text="numbers" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="pfont acea-row row-middle">
|
||||
<el-avatar icon="el-icon-user-solid" size="small" class="mr10" />
|
||||
<span>已发送</span>
|
||||
</span>
|
||||
<span class="rR" v-text="sendTotal" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="rR" v-text="sendTotal" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="pfont acea-row row-middle">
|
||||
<el-avatar icon="el-icon-user-solid" size="small" class="mr10" />
|
||||
<span>总条数</span>
|
||||
</span>
|
||||
<span class="rR" v-text="amount" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<span class="rR" v-text="amount" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -3,18 +3,20 @@
|
||||
<div class="divBox" v-if="isLogin">
|
||||
<el-card v-loading="fullscreenLoading" class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="filter-container">
|
||||
<div class="demo-input-suffix acea-row">
|
||||
<span class="seachTiele">模板状态:</span>
|
||||
<el-select v-model="tableFrom.status" placeholder="请选择" clearable class="filter-item selWidth mr20" @change="userSearchs">
|
||||
<el-option value="1">可用</el-option>
|
||||
<el-option value="0">不可用</el-option>
|
||||
</el-select>
|
||||
<span class="seachTiele">模板名称:</span>
|
||||
<el-input v-model="tableFrom.title" placeholder="请输入商品名称,关键字,产品编号" class="selWidth">
|
||||
<el-button slot="append" icon="el-icon-search" @change="userSearchs" />
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="container">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="模板状态:" class="mr10">
|
||||
<el-select v-model="tableFrom.status" placeholder="请选择" clearable class="filter-item selWidth mr20" @change="userSearchs">
|
||||
<el-option value="1" label="可用"></el-option>
|
||||
<el-option value="0" label="不可用"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板名称:" class="mr10">
|
||||
<el-input v-model="tableFrom.title" placeholder="请输入模板名称" class="selWidth">
|
||||
<el-button slot="append" icon="el-icon-search" @click="userSearchs" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-button size="mini" type="primary" @click="add">添加短信模板</el-button>
|
||||
</div>
|
||||
@@ -105,8 +107,8 @@ export default {
|
||||
filters: {
|
||||
statusFilter(status) {
|
||||
const statusMap = {
|
||||
0: '没有',
|
||||
1: '有'
|
||||
0: '不可用',
|
||||
1: '可用'
|
||||
}
|
||||
return statusMap[status]
|
||||
},
|
||||
|
||||
@@ -946,6 +946,7 @@
|
||||
// 提交
|
||||
handleSubmit (name) {
|
||||
this.onChangeGroup()
|
||||
if( this.formValidate.specType && this.formValidate.attr.length < 1 ) return this.$message.warning("请填写多规格属性!");
|
||||
this.formValidate.cateId = this.formValidate.cateIds.join(',')
|
||||
this.formValidate.sliderImage = JSON.stringify(this.formValidate.sliderImages)
|
||||
if(this.formValidate.specType){
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -98,6 +98,7 @@
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
:disabled="tableFrom.type === '5'"
|
||||
v-model="scope.row.isShow"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
@@ -120,7 +121,8 @@
|
||||
<router-link :to="{path: '/store/list/creatProduct/' + scope.row.id}">
|
||||
<el-button type="text" size="small" class="mr10">编辑</el-button>
|
||||
</router-link>
|
||||
<el-button type="text" size="small" @click="handleDelete(scope.row.id, scope.$index)">删除</el-button>
|
||||
<el-button v-if="tableFrom.type === '5'" type="text" size="small" @click="handleRestore(scope.row.id, scope.$index)">恢复商品</el-button>
|
||||
<el-button type="text" size="small" @click="handleDelete(scope.row.id, scope.$index)">{{ tableFrom.type === '5' ? '删除' : '加入回收站' }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -148,7 +150,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { productLstApi, productDeleteApi, categoryApi, putOnShellApi, offShellApi, productHeadersApi, productExportApi } from '@/api/store'
|
||||
import { productLstApi, productDeleteApi, categoryApi, putOnShellApi, offShellApi, productHeadersApi, productExportApi, restoreApi } from '@/api/store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import taoBao from './taoBao'
|
||||
export default {
|
||||
@@ -188,6 +190,16 @@ export default {
|
||||
this.getCategorySelect()
|
||||
},
|
||||
methods: {
|
||||
handleRestore(id) {
|
||||
this.$modalSure("恢复商品").then(() => {
|
||||
restoreApi(id)
|
||||
.then((res) => {
|
||||
this.$message.success('操作成功');
|
||||
this.goodHeade();
|
||||
this.getList();
|
||||
})
|
||||
});
|
||||
},
|
||||
seachList() {
|
||||
this.tableFrom.page = 1
|
||||
this.getList()
|
||||
|
||||
@@ -17,15 +17,27 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品搜索:" class="mr10">
|
||||
<el-input v-model="tableFrom.productId" placeholder="请输入商品名称,关键字,产品编号" class="selWidth" size="small">
|
||||
<el-input v-model="tableFrom.productSearch" placeholder="请输入商品名称,商品id" class="selWidth" size="small">
|
||||
<el-button slot="append" icon="el-icon-search" @click="seachList" size="small"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名称:">
|
||||
<el-input v-model="tableFrom.nickname" placeholder="请输入用户名称" class="selWidth" size="small">
|
||||
<el-button slot="append" icon="el-icon-search" @click="seachList" size="small"/>
|
||||
</el-input>
|
||||
{{uids}}
|
||||
<el-select v-model="uids" style="width: 500px" reserve-keyword multiple remote filterable
|
||||
:remote-method="remoteMethod" :loading="loading" placeholder="请输入用户名称" clearable @change="seachList">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.uid"
|
||||
:label="item.nickname"
|
||||
:value="item.uid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="用户名称:">-->
|
||||
<!--<el-input v-model="tableFrom.nickname" placeholder="请输入用户名称" class="selWidth" size="small">-->
|
||||
<!--<el-button slot="append" icon="el-icon-search" @click="seachList" size="small"/>-->
|
||||
<!--</el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
</el-form>
|
||||
</div>
|
||||
<el-button size="small" type="primary" @click="add">添加虚拟评论</el-button>
|
||||
@@ -120,6 +132,7 @@
|
||||
import creatComment from './creatComment.vue'
|
||||
import { categoryApi, replyListApi, replyDeleteApi, replyCommentApi } from '@/api/store'
|
||||
import { formatDates } from '@/utils/index';
|
||||
import { userListApi } from '@/api/user'
|
||||
export default {
|
||||
name: 'StoreComment',
|
||||
filters: {
|
||||
@@ -163,11 +176,14 @@ export default {
|
||||
limit: 20,
|
||||
isReply: '',
|
||||
dateLimit: '',
|
||||
nickname: '',
|
||||
productId:'',
|
||||
uid: '',
|
||||
productSearch:'',
|
||||
isDel: false
|
||||
},
|
||||
timeVal: []
|
||||
timeVal: [],
|
||||
loading: false,
|
||||
uids: [],
|
||||
options: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -176,6 +192,19 @@ export default {
|
||||
this.getCategorySelect()
|
||||
},
|
||||
methods:{
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
this.loading = true;
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
userListApi({keywords: query, page: 1, limit: 10}).then(res => {
|
||||
this.options = res.list
|
||||
})
|
||||
}, 200);
|
||||
} else {
|
||||
this.options = [];
|
||||
}
|
||||
},
|
||||
seachList() {
|
||||
this.tableFrom.page = 1
|
||||
this.getList()
|
||||
@@ -278,6 +307,7 @@ export default {
|
||||
// 列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
this.tableFrom.uid = this.uids.join(',')
|
||||
replyListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list
|
||||
this.tableData.total = res.total
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<el-form-item label="管理员密码" prop="pwd">
|
||||
<el-input
|
||||
v-model="pram.pwd"
|
||||
placeholder="管理员密码,不更改可以不填写"
|
||||
placeholder="管理员密码"
|
||||
clearable
|
||||
@input="handlerPwdInput"
|
||||
@clear="handlerPwdInput"
|
||||
@@ -77,7 +77,7 @@ export default {
|
||||
pwd: null,
|
||||
repwd: null,
|
||||
realName: null,
|
||||
roles: null,
|
||||
roles: [],
|
||||
status: null,
|
||||
id: null
|
||||
},
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
pwd: [{ required: true, message: '请填管理员密码', trigger: ['blur', 'change'] }],
|
||||
repwd: [{ required: true, message: '确认密码密码', validator: validatePass, trigger: ['blur', 'change'] }],
|
||||
realName: [{ required: true, message: '管理员姓名', trigger: ['blur', 'change'] }],
|
||||
roles: [{ required: true, message: '管理员身份', trigger: ['blur', 'change'] }]
|
||||
roles: [{ required: true, message: '管理员身份', type: 'array', trigger: ['blur', 'change'] }]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -103,7 +103,8 @@ export default {
|
||||
handleGetRoleList() {
|
||||
const _pram = {
|
||||
page: 1,
|
||||
limit: constants.page.limit[4]
|
||||
limit: constants.page.limit[4],
|
||||
status: 1
|
||||
}
|
||||
roleApi.getRoleList(_pram).then(data => {
|
||||
this.roleList = data
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-card class="box-card">
|
||||
<el-form inline size="small">
|
||||
<el-form-item>
|
||||
<el-select v-model="listPram.realName" placeholder="身份" clearable class="selWidth">
|
||||
<el-select v-model="listPram.roles" placeholder="身份" clearable class="selWidth">
|
||||
<el-option
|
||||
v-for="item in roleList.list"
|
||||
:key="item.id"
|
||||
@@ -33,10 +33,10 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="listPram.roleName" placeholder="姓名或者账号" clearable class="selWidth"/>
|
||||
<el-input v-model="listPram.realName" placeholder="姓名或者账号" clearable class="selWidth"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button size="mini" type="primary" @click.native="handleGetAdminList">查询</el-button>
|
||||
<el-button size="mini" type="primary" @click="handleSearch">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form inline>
|
||||
@@ -136,7 +136,7 @@ export default {
|
||||
roles: null,
|
||||
status: null,
|
||||
page: 1,
|
||||
limit: constants.page.limit[1]
|
||||
limit: constants.page.limit[0]
|
||||
},
|
||||
roleList: [],
|
||||
menuList: [],
|
||||
@@ -152,12 +152,18 @@ export default {
|
||||
this.handleGetRoleList()
|
||||
},
|
||||
methods: {
|
||||
handleSearch() {
|
||||
this.listPram.page = 1
|
||||
this.handleGetAdminList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.listPram.limit = val
|
||||
this.handleGetAdminList()
|
||||
this.handleGetRoleList(this.listPram)
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.listPram.page = val
|
||||
this.handleGetAdminList()
|
||||
this.handleGetRoleList(this.listPram)
|
||||
},
|
||||
handleGetRoleList() {
|
||||
@@ -171,15 +177,15 @@ export default {
|
||||
},
|
||||
handlerOpenDel(rowData) {
|
||||
this.$confirm('确认删除当前数据').then(() => {
|
||||
const _pram = { id: rowData.id, isDel: 1, roles: Array.of(rowData.roles) }
|
||||
systemAdminApi.adminUpdate(_pram).then(data => {
|
||||
const _pram = { id: rowData.id}
|
||||
systemAdminApi.adminDel(_pram).then(data => {
|
||||
this.$message.success('删除数据成功')
|
||||
this.handleGetAdminList()
|
||||
})
|
||||
})
|
||||
},
|
||||
handleGetAdminList() {
|
||||
systemAdminApi.adminList(this.listPram).then(data => {
|
||||
systemAdminApi.adminList( this.listPram ).then(data => {
|
||||
this.listData = data
|
||||
// this.handlerGetMenuList()
|
||||
})
|
||||
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
updateTime: null,
|
||||
level: null,
|
||||
page: 1,
|
||||
limit: constants.page.limit[1],
|
||||
limit: constants.page.limit[0],
|
||||
roleName: null,
|
||||
rules: null,
|
||||
status: null
|
||||
|
||||
@@ -4,9 +4,19 @@
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form ref="form" inline :model="form">
|
||||
<el-form-item label="搜索:">
|
||||
<el-input v-model="form.name" placeholder="请输入内容" class="selWidth" size="small">
|
||||
<el-button slot="append" size="small" icon="el-icon-search" @click="getExpressList" />
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="form.isShow" placeholder="状态" clearable @change="handlerSearch" class="selWidth">
|
||||
<el-option
|
||||
v-for="item in constants.switchStatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字:">
|
||||
<el-input v-model="form.keywords" placeholder="请输入关键字" class="selWidth" size="small">
|
||||
<el-button slot="append" size="small" icon="el-icon-search" @click="handlerSearch" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -67,7 +77,7 @@
|
||||
</el-table>
|
||||
<div class="block-pagination">
|
||||
<el-pagination
|
||||
:page-sizes="[12, 20, 40, 60]"
|
||||
:page-sizes="[20, 40, 60, 80]"
|
||||
:page-size="tableData.limit"
|
||||
:current-page="tableData.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@@ -78,7 +88,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
title="提示"
|
||||
title="添加物流公司"
|
||||
:visible.sync="dialogVisible"
|
||||
width="700px"
|
||||
:before-close="handleClose"
|
||||
@@ -92,19 +102,22 @@
|
||||
import parser from '@/components/FormGenerator/components/parser/Parser'
|
||||
import * as systemFormConfigApi from '@/api/systemFormConfig.js'
|
||||
import * as logistics from '@/api/logistics.js'
|
||||
import * as constants from '@/utils/constants.js'
|
||||
export default {
|
||||
name: 'CompanyList',
|
||||
components: { parser },
|
||||
data() {
|
||||
return {
|
||||
constants,
|
||||
// 表单
|
||||
formConf: { fields: [] },
|
||||
form: {
|
||||
name: ''
|
||||
keywords: '',
|
||||
isShow: null
|
||||
},
|
||||
tableData: {},
|
||||
page: 1,
|
||||
limit: 12,
|
||||
limit: 20,
|
||||
loading: false,
|
||||
dialogVisible: false,
|
||||
fromType: 'add',
|
||||
@@ -118,13 +131,18 @@ export default {
|
||||
this.getExpressList()
|
||||
},
|
||||
methods: {
|
||||
handlerSearch() {
|
||||
this.page = 1
|
||||
this.getExpressList()
|
||||
},
|
||||
// 获取物流公司列表
|
||||
getExpressList() {
|
||||
this.loading = true
|
||||
logistics.expressList({
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
keywords: this.form.name
|
||||
keywords: this.form.keywords,
|
||||
isShow: this.form.isShow
|
||||
}).then(res => {
|
||||
this.loading = false
|
||||
this.tableData = res
|
||||
@@ -182,7 +200,6 @@ export default {
|
||||
})
|
||||
} else {
|
||||
data.id = this.editId
|
||||
console.log(data)
|
||||
logistics.expressUpdate(data).then(res => {
|
||||
this.handleClose()
|
||||
this.getExpressList()
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form ref="form" inline :model="form">
|
||||
<el-form-item label="搜索:">
|
||||
<el-input v-model="form.name" placeholder="请输入内容" class="selWidth" size="small">
|
||||
<el-form-item label="模板名称:">
|
||||
<el-input v-model="form.keywords" placeholder="请输入模板名称" class="selWidth" size="small">
|
||||
<el-button slot="append" icon="el-icon-search" @click="handleSearch" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -26,7 +26,7 @@
|
||||
/>
|
||||
<el-table-column
|
||||
label="模板名称"
|
||||
min-width="150"
|
||||
min-width="180"
|
||||
prop="name"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -47,11 +47,11 @@
|
||||
<p>{{ row.appoint | statusFilter }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
min-width="120"
|
||||
label="指定区域不配送"
|
||||
prop="type"
|
||||
/>
|
||||
<!--<el-table-column-->
|
||||
<!--min-width="120"-->
|
||||
<!--label="指定区域不配送"-->
|
||||
<!--prop="type"-->
|
||||
<!--/>-->
|
||||
<el-table-column
|
||||
label="排序"
|
||||
min-width="100"
|
||||
@@ -76,7 +76,7 @@
|
||||
</el-table>
|
||||
<div class="block-pagination">
|
||||
<el-pagination
|
||||
:page-sizes="[12, 20, 40, 60]"
|
||||
:page-sizes="[20, 40, 60, 80]"
|
||||
:page-size="tableData.limit"
|
||||
:current-page="tableData.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@@ -117,11 +117,11 @@ export default {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
form: {
|
||||
name: ''
|
||||
keywords: ''
|
||||
},
|
||||
tableData: '',
|
||||
page: 1,
|
||||
limit: 12,
|
||||
limit: 20,
|
||||
loading: false
|
||||
}
|
||||
},
|
||||
@@ -136,6 +136,7 @@ export default {
|
||||
this.$refs.addTemplates.changType(0, this.te)
|
||||
},
|
||||
handleSearch() {
|
||||
this.page = 1
|
||||
this.getDataList()
|
||||
},
|
||||
// 分页
|
||||
@@ -151,7 +152,7 @@ export default {
|
||||
getDataList() {
|
||||
this.loading = true
|
||||
logistics.shippingTemplatesList({
|
||||
name: this.form.name,
|
||||
keywords: this.form.keywords,
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
}).then(res => {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
{{activeNamel1}}
|
||||
<el-tabs v-model="activeNamel1" @tab-click="handleTabClick">
|
||||
<el-tabs v-model="activeNamel1" @tab-click="handleTabClick" v-loading="loading">
|
||||
<el-tab-pane
|
||||
v-for="tab,index in treeList"
|
||||
:key="index"
|
||||
@@ -26,7 +25,6 @@
|
||||
</template>
|
||||
<!-- 正常配置渲染-->
|
||||
<template v-else>
|
||||
{{activeNamel2}}
|
||||
<el-tabs v-if="tab.child.length > 0" v-model="activeNamel2"
|
||||
type="border-card" @tab-click="handleItemTabClick">
|
||||
<el-tab-pane
|
||||
@@ -75,6 +73,7 @@ export default {
|
||||
components: {Template, parser },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
formConf: { content: { fields: [] }, id: null, render: false, isEdit: false },
|
||||
formConfChild: { content: { fields: [] }, id: null, render: false, isEdit: false },
|
||||
activeNamel1: null,
|
||||
@@ -88,7 +87,6 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.$route.path.split("/")[1])
|
||||
this.handlerGetTreeList()
|
||||
this.getCurrentUploadSelectedFlag()
|
||||
},
|
||||
@@ -137,11 +135,15 @@ export default {
|
||||
this.currentEditId = id
|
||||
this.formConf.content = { fields: [] }
|
||||
this.formConf.render = false
|
||||
this.loading = true
|
||||
systemFormConfigApi.getFormConfigInfo(formPram).then(data => {
|
||||
const { id, name, info, content } = data
|
||||
this.formConf.content = JSON.parse(content)
|
||||
this.formConf.id = id
|
||||
this.handlerGetSettingInfo(id, 1)
|
||||
this.loading = false
|
||||
}).catch(() =>{
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleItemTabClick(tab, event) { //这里对tabs=tab.name和radio=id做了兼容
|
||||
@@ -154,11 +156,15 @@ export default {
|
||||
this.currentEditId = id
|
||||
this.formConfChild.content = { fields: [] }
|
||||
this.formConfChild.render = false
|
||||
this.loading = true
|
||||
systemFormConfigApi.getFormConfigInfo(formPram).then(data => {
|
||||
const { id, name, info, content } = data
|
||||
this.formConfChild.content = JSON.parse(content)
|
||||
this.formConfChild.id = id
|
||||
this.handlerGetSettingInfo(id, 2)
|
||||
this.loading = false
|
||||
}).catch(() =>{
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handlerGetSettingInfo(id, level) {
|
||||
@@ -203,6 +209,7 @@ export default {
|
||||
},
|
||||
handlerGetTreeList() {
|
||||
const _pram = { type: constants.categoryType[5].value, status: -1 }
|
||||
this.loading = true
|
||||
categoryApi.treeCategroy(_pram).then(data => {
|
||||
this.treeList = this.handleAddArrt(data)
|
||||
if (this.treeList.length > 0) this.activeNamel1 = this.treeList[0].extra
|
||||
@@ -214,6 +221,9 @@ export default {
|
||||
} else {
|
||||
this.handlerGetLevel1FormConfig(this.treeList[0].extra)
|
||||
}
|
||||
this.loading = false
|
||||
}).catch(() =>{
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleAddArrt(treeData) {
|
||||
|
||||
@@ -27,19 +27,19 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="用户等级:">
|
||||
<el-select v-model="ruleForm.level" placeholder="请选择" class="selWidth" clearable filterable>
|
||||
<el-option value="">全部</el-option>
|
||||
<el-option value="" label="全部"></el-option>
|
||||
<el-option :value="item.id" v-for="(item, index) in levelList" :key="index" :label="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户分组:">
|
||||
<el-select v-model="ruleForm.groupId" placeholder="请选择" class="selWidth" clearable filterable>
|
||||
<el-option value="">全部</el-option>
|
||||
<el-option value="" label="全部"></el-option>
|
||||
<el-option :value="item.id" v-for="(item, index) in groupList" :key="index" :label="item.groupName"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户标签:">
|
||||
<el-select v-model="labelData" placeholder="请选择" class="selWidth" clearable filterable multiple >
|
||||
<el-option value="">全部</el-option>
|
||||
<el-option value="" label="全部"></el-option>
|
||||
<el-option :value="item.id" v-for="(item, index) in labelLists" :key="index" :label="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -148,8 +148,8 @@
|
||||
this.ruleForm.tagId=this.labelData.join(',')
|
||||
userUpdateApi({id: this.ruleForm.id},this.ruleForm).then(async res => {
|
||||
this.$message.success('编辑成功')
|
||||
this.$parent.visible = false
|
||||
this.$parent.getList()
|
||||
this.$parent.$parent.visible = false
|
||||
this.$parent.$parent.getList()
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<el-tab-pane :label="item.name" :name="item.type.toString()" v-for="(item,index) in headeNum" :key="index"/>
|
||||
</el-tabs>
|
||||
<div class="container">
|
||||
<el-form inline size="small" :label-position="labelPosition" label-width="100px">
|
||||
<el-form inline size="small" :model="userFrom" ref="userFrom" :label-position="labelPosition" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18">
|
||||
<el-col v-bind="grid">
|
||||
@@ -27,7 +27,6 @@
|
||||
<el-col v-bind="grid">
|
||||
<el-form-item label="用户等级:">
|
||||
<el-select v-model="levelData" placeholder="请选择" class="selWidth" clearable filterable multiple>
|
||||
<el-option value="">全部</el-option>
|
||||
<el-option :value="item.id" v-for="(item, index) in levelList" :key="index" :label="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -35,7 +34,6 @@
|
||||
<el-col v-bind="grid">
|
||||
<el-form-item label="用户分组:">
|
||||
<el-select v-model="groupData" placeholder="请选择" class="selWidth" clearable filterable multiple>
|
||||
<el-option value="">全部</el-option>
|
||||
<el-option :value="item.id" v-for="(item, index) in groupList" :key="index" :label="item.groupName"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -43,7 +41,6 @@
|
||||
<el-col v-bind="grid">
|
||||
<el-form-item label="用户标签:">
|
||||
<el-select v-model="labelData" placeholder="请选择" class="selWidth" clearable filterable multiple>
|
||||
<el-option value="">全部</el-option>
|
||||
<el-option :value="item.id" v-for="(item, index) in labelLists" :key="index" :label="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -104,23 +101,23 @@
|
||||
<el-col v-bind="grid">
|
||||
<el-form-item label="访问情况:">
|
||||
<el-select v-model="userFrom.accessType" placeholder="请选择" class="selWidth" clearable>
|
||||
<el-option value="">全部</el-option>
|
||||
<el-option value="visitno">时间段未访问</el-option>
|
||||
<el-option value="visit">时间段访问过</el-option>
|
||||
<el-option value="add_time">首次访问</el-option>
|
||||
<el-option value="" label="全部"></el-option>
|
||||
<el-option value="visitno" label="时间段未访问"></el-option>
|
||||
<el-option value="visit" label="时间段访问过"></el-option>
|
||||
<el-option value="add_time" label="首次访问"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-bind="grid">
|
||||
<el-form-item label="消费情况:">
|
||||
<el-select v-model="userFrom.payCount" placeholder="请选择" class="selWidth" clearable>
|
||||
<el-option value="">全部</el-option>
|
||||
<el-option value="-1">0</el-option>
|
||||
<el-option value="0">1+</el-option>
|
||||
<el-option value="1">2+</el-option>
|
||||
<el-option value="2">3+</el-option>
|
||||
<el-option value="3">4+</el-option>
|
||||
<el-option value="4">5+</el-option>
|
||||
<el-option value="" label="全部"></el-option>
|
||||
<el-option value="-1" label="0"></el-option>
|
||||
<el-option value="0" label="1+"></el-option>
|
||||
<el-option value="1" label="2+"></el-option>
|
||||
<el-option value="2" label="3+"></el-option>
|
||||
<el-option value="3" label="4+"></el-option>
|
||||
<el-option value="4" label="5+"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -216,7 +213,7 @@
|
||||
<el-table-column
|
||||
prop="uid"
|
||||
label="ID"
|
||||
min-width="50"
|
||||
min-width="80"
|
||||
/>
|
||||
<el-table-column label="头像" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
@@ -230,10 +227,15 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="nickname"
|
||||
label="姓名"
|
||||
min-width="150"
|
||||
/>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.nickname | filterEmpty}}</span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="用户等级"
|
||||
min-width="100"
|
||||
@@ -265,6 +267,11 @@
|
||||
label="余额"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="integral"
|
||||
label="积分"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column label="操作" min-width="200" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="onDetails(scope.row.uid)">账户详情</el-button>
|
||||
@@ -493,9 +500,9 @@
|
||||
},
|
||||
headeNum: [
|
||||
{ 'type': '', 'name': '全部用户' },
|
||||
{ 'type': 'wechat', 'name': '微信公众号' },
|
||||
{ 'type': 'routine', 'name': '微信小程序' },
|
||||
{ 'type': 'h5', 'name': 'H5' }
|
||||
{ 'type': 'wechat', 'name': '微信公众号用户' },
|
||||
{ 'type': 'routine', 'name': '微信小程序用户' },
|
||||
{ 'type': 'h5', 'name': 'H5用户' }
|
||||
],
|
||||
listLoading: true,
|
||||
tableData: {
|
||||
@@ -505,8 +512,7 @@
|
||||
loginType: '',
|
||||
userFrom: {
|
||||
labelId: '',
|
||||
loginType: '',
|
||||
status: true,
|
||||
userType: '',
|
||||
sex: '',
|
||||
isPromoter: '',
|
||||
country: '',
|
||||
@@ -569,6 +575,29 @@
|
||||
this.getCityList()
|
||||
},
|
||||
methods: {
|
||||
reset(formName) {
|
||||
this.userFrom = {
|
||||
labelId: '',
|
||||
userType: '',
|
||||
sex: '',
|
||||
isPromoter: '',
|
||||
country: '',
|
||||
payCount: '',
|
||||
accessType: '',
|
||||
dateLimit: '',
|
||||
keywords: '',
|
||||
province: '',
|
||||
city: '',
|
||||
page: 1,
|
||||
limit: 15,
|
||||
level: '',
|
||||
groupId: ''
|
||||
}
|
||||
this.levelData = []
|
||||
this.groupData = []
|
||||
this.labelData = []
|
||||
this.getList()
|
||||
},
|
||||
// 列表
|
||||
getCityList() {
|
||||
logistics.cityListTree().then(res => {
|
||||
@@ -624,6 +653,7 @@
|
||||
this.$message.success('设置成功')
|
||||
this.loadingBtn = false
|
||||
this.handlePointClose()
|
||||
this.getList()
|
||||
}).catch(() => {
|
||||
this.loadingBtn = false
|
||||
})
|
||||
@@ -741,8 +771,8 @@
|
||||
// 列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
if(this.loginType == 0) this.loginType =''
|
||||
this.userFrom.loginType = this.loginType
|
||||
this.userFrom.userType = this.loginType
|
||||
if(this.loginType == 0) this.userFrom.userType =''
|
||||
this.userFrom.level = this.levelData.join(',')
|
||||
this.userFrom.groupId = this.groupData.join(',')
|
||||
this.userFrom.labelId = this.labelData.join(',')
|
||||
|
||||
Reference in New Issue
Block a user