Commit cd2f9f06 by 陈羽

update: 小程序素材

parent 85548c4a
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2020-04-14 09:50:16
* @LastEditors: 无尘
* @LastEditTime: 2020-05-19 11:40:14
-->
<!--
<image-edit :categoryId="categoryId" @closeText="closeText" @submitText="submitText"></image-edit>
import imageEdit from '@/components/set/image-edit.vue';
-->
<template>
<el-dialog :title="!!editRow.materialId ? '编辑网页' : '新建网页'" :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
<div class="">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="小程序" prop="appId">
<el-select v-model="ruleForm.appId" placeholder="请选择小程序" @change="appsChange">
<el-option v-for="item in appList" :key="item.value" :label="item.miniprogramName" :value="item.appId"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="标题" prop="materialTitle">
<limitInput :inputWidth="440" :inputValue.sync="ruleForm.materialTitle" :holder="'请输入标题'" :getByType="'word'" :maxLength="8"> </limitInput>
</el-form-item>
<el-form-item label="页面路径" prop="link">
<limitInput :inputWidth="440" :inputValue.sync="ruleForm.link" :holder="'请输入页面路径'" :getByType="'word'" :maxLength="100"> </limitInput>
</el-form-item>
<el-form-item label="封面" prop="imgUrl">
<single-upload uploadType="4" :uploadLimit="1" :imgSrc.sync="ruleForm.imgUrl"> </single-upload>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="toCancel">取消</el-button>
<el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
</div>
</el-dialog>
</template>
<script>
import singleUpload from '@/components/single-upload.vue';
import limitInput from '@/components/limit-input.vue';
import limitTextarea from '@/components/limit-textarea.vue';
import { _debounce } from '@/common/js/public';
import { postRequest, getRequest } from '@/api/api';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
import { emojiArr } from '@/utils/emoji';
export default {
props: {
editRow: {
type: Object,
default() {
return {};
}
},
categoryId: {
type: Object,
default() {
return '';
}
}
},
components: {
limitInput,
limitTextarea,
singleUpload
},
data() {
const validateUrl = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入页面路径'));
} else {
callback();
}
};
return {
editPersion: localStorage.getItem('userName'),
dialogVisible: true,
appList: [],
ruleForm: {
appId: null,
materialId: '',
link: '',
materialTitle: '',
imgUrl: ''
},
rules: {
appId: [{ required: true, message: '请选择小程序', trigger: 'blur' }],
materialTitle: [{ required: true, message: '请输入标题', trigger: 'blur' }],
link: [{ required: true, validator: validateUrl, trigger: 'blur' }],
imgUrl: [{ required: true, message: '请上传封面', trigger: 'blur' }]
},
emojiList: emojiArr
};
},
methods: {
getAppData() {
const that = this;
getRequest('/haoban-manage3-web/list-miniprogram-setting', {})
.then(res => {
if (res.data.errorCode == 1) {
let resData = res.data;
that.appList = Array.isArray(resData.result) ? resData.result : [];
return;
}
errMsg.errorMsg(res.data);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
appsChange(v) {
const that = this;
const item = that.appList.filter(item => item.appId === v)[0];
console.log(item);
this.ruleForm = Object.assign({}, this.ruleForm, {
appId: item.appId,
materialTitle: item.title,
imgUrl: item.imageUrl
});
},
toCancel() {
const that = this;
that.$emit('closeText');
that.$refs['ruleForm'].resetFields();
},
handleClose(done) {
const that = this;
that.$emit('closeText');
that.$refs['ruleForm'].resetFields();
},
submitForm: _debounce(function(formName) {
const that = this;
that.$refs[formName].validate(valid => {
if (valid) {
that.postSave();
}
});
}, 300),
postSave() {
const that = this;
const data = {
categoryId: that.categoryId,
materialType: 6,
appId: that.ruleForm.appId,
link: that.ruleForm.link,
materialId: that.ruleForm.materialId,
materialTitle: that.ruleForm.materialTitle,
imgUrl: that.ruleForm.imgUrl
};
console.log(data);
postRequest(that.ruleForm.materialId ? '/haoban-manage3-web/material-edit' : '/haoban-manage3-web/material-add', data)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('操作成功', 'success');
that.$refs['ruleForm'].resetFields();
that.$emit('submitText');
} else {
errMsg.errorMsg(resData);
}
})
.catch(error => {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
editRow(newData) {
const that = this;
if (Object.keys(newData).length) {
that.ruleForm = JSON.parse(JSON.stringify(newData));
}
}
},
mounted() {
const that = this;
that.getAppData();
if (Object.keys(that.editRow).length) {
that.ruleForm = JSON.parse(JSON.stringify(that.editRow));
}
}
};
</script>
<style lang="scss" scoped>
.m-b-20 {
margin-bottom: 20px;
}
.p-l-18 {
padding-left: 18px;
}
.material-content {
position: relative;
.material-body {
/* resize: none;
width: 440px;
height: 273px;
border-radius: 2px;
border: 1px solid rgba(196, 198, 207, 1); */
.el-textarea {
>>> .el-textarea__inner {
height: 273px;
}
}
}
.emoji-img {
position: absolute;
left: 10px;
bottom: 10px;
}
}
.el-textarea {
>>> .el-textarea__inner {
height: 273px;
}
}
</style>
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-08-17 16:25:09
-->
<!--
<image-table :categoryId="currentCategoryId" :textTableData="tableData" @handleSelectionChange="handleSelectionChange" @refreshTable="refreshTable" @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange"></image-table>
import imageTable from '@/components/set/image-table.vue';
-->
<template>
<div class="text-table-body">
<el-table class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="45"> </el-table-column>
<el-table-column label="标题" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.materialTitle }} </template>
</el-table-column>
<el-table-column prop="" label="封面">
<template slot-scope="scope"
><div style="width: 40px;height:40px;"><img :src="scope.row.imgUrl" alt="" style="width: 40px;height:40px;" /></div
></template>
</el-table-column>
<el-table-column prop="link" label="页面路径" show-overflow-tooltip></el-table-column>
<el-table-column prop="" label="关联小程序" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.link }}</template>
</el-table-column>
<el-table-column prop="" label="编辑人" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.staffName }}</template>
</el-table-column>
<el-table-column prop="" label="最近编辑时间" show-overflow-tooltip>
<template slot-scope="scope">
<div class="color-606266 line-18">{{ scope.row.updateTime | timeStampToYmd }}</div>
<div class="color-606266 line-18">{{ scope.row.updateTime | timeStampToHms }}</div>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<template v-if="scope.row.fromMaterialId == '-1'">
<el-button type="text" @click="toEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="text" @click="toDel(scope.$index, scope.row)">删除</el-button>
<el-button type="text" @click="toDistribute(scope.$index, scope.row)">分配企业</el-button>
</template>
</template>
</el-table-column>
</el-table>
<div class="block common-wrap__page text-right m-t-24" v-if="tableData.length != 0">
<dm-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </dm-pagination>
</div>
<apps-edit v-if="appsShow" :editRow="editRow" :categoryId="categoryId" @closeText="closeText" @submitText="submitText"></apps-edit>
<distribution-enterprise :editRow="distributionEditRow" :show="showDistribution" @closeText="closeTextDistribution" @submitText="submitTextDistribution"></distribution-enterprise>
</div>
</template>
<script>
import distributionEnterprise from '@/components/set/distribution-enterprise.vue';
import appsEdit from '@/components/set/apps-edit.vue';
import { postRequest } from '@/api/api';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
export default {
props: {
brandId: {
type: String,
default() {
return '';
}
},
categoryId: {
type: String,
default() {
return '';
}
},
textTableData: {
type: [Array, Object],
default() {
return [];
}
},
currentPage: {
type: [String, Number],
default() {
return 1;
}
},
pageSize: {
type: [String, Number],
default() {
return 20;
}
},
total: {
type: [String, Number],
default() {
return 0;
}
}
},
data() {
return {
tableData: [],
multipleSelection: [],
appsShow: false,
editRow: {},
showDistribution: false,
distributionEditRow: {}
};
},
computed: {},
methods: {
/**
* 文本弹窗关闭
*/
closeText() {
const that = this;
that.appsShow = false;
that.editRow = {};
},
submitText() {
const that = this;
that.appsShow = false;
that.editRow = {};
that.$emit('refreshTable');
},
closeTextDistribution() {
this.showDistribution = false;
this.distributionEditRow = {};
},
submitTextDistribution() {
const that = this;
that.showDistribution = false;
that.distributionEditRow = {};
that.$emit('refreshTable');
},
toDistribute(index, row) {
this.showDistribution = true;
this.distributionEditRow = row;
},
/**
* 编辑
*/
toEdit(index, row) {
const that = this;
that.appsShow = true;
that.editRow = row;
},
/**
* 删除
*/
toDel(index, row) {
const that = this;
that
.$confirm('确定删除当前素材?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
that.postDel(index, row);
})
.catch(() => {});
},
postDel(index, row) {
const that = this;
let para = {
materialIds: row.materialId
};
postRequest('/haoban-manage3-web/material-del', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('删除成功', 'success');
that.$emit('refreshTable');
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 表格选择
*/
handleSelectionChange(val) {
const that = this;
that.multipleSelection = val;
that.$emit('handleSelectionChange', val);
},
/**
* 批量删除
*/
multDel() {
const that = this;
if (!that.multipleSelection.length) {
that.$message.error({
duration: 1000,
message: '请选择删除项'
});
return false;
}
that.showDialog = true;
},
/* *
* 批量删除---弹窗关闭
*/
hideDialog(obj) {
const that = this;
that.showDialog = false;
if (!Object.keys(obj).length) {
return false;
}
that.postMultDel(obj);
},
/**
* 分页---页码变化
* @param {Number} val
*/
handleSizeChange(val) {
const that = this;
that.$emit('handleSizeChange', val);
},
/**
* 分页---当前页变化
* @param {Number} val
*/
handleCurrentChange(val) {
const that = this;
that.$emit('handleCurrentChange', val);
}
},
watch: {
textTableData: function(newData, oldData) {
let that = this;
if (!!newData.length) {
that.tableData = JSON.parse(JSON.stringify(newData));
} else {
that.tableData = [];
}
}
},
mounted() {
const that = this;
that.activeBrand = that.brandId;
if (!!that.textTableData.length) {
that.tableData = JSON.parse(JSON.stringify(that.textTableData));
} else {
that.tableData = [];
}
},
components: {
appsEdit,
distributionEnterprise
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.text-table-body {
padding: 0 20px;
}
.color-c0c4cc {
display: inline-block;
line-height: 34px;
padding-left: 10px;
color: #c0c4cc;
}
.condition-tips {
display: inline-block;
vertical-align: middle;
line-height: 32px;
}
.table-condition {
// min-width: 1200px;
}
.daily-set-wrap {
height: 100%;
.daily-set-content {
padding: 20px;
.table-condition-left {
font-size: 0;
}
}
.depart-item-content {
width: 213px;
height: 32px;
overflow: hidden;
white-space: nowrap;
border-radius: 4px;
border: 1px solid #dcdfe6;
cursor: pointer;
}
.item-cell-select {
>>> .el-select__tags {
white-space: nowrap;
overflow: hidden;
}
}
.depart-cell {
position: relative;
margin: 0 24px 24px 0;
.el-icon-circle-close {
position: absolute;
top: -10px;
right: -10px;
font-size: 16px;
color: #808995;
cursor: pointer;
}
}
}
</style>
......@@ -20,7 +20,7 @@
<video v-if="videoSrc != '' && videoFlag == false" :src="videoSrc" class="avatar">您的浏览器不支持视频播放</video>
<div v-if="!imgSrc && !videoSrc">
<i class="el-icon-plus avatar-uploader-icon"></i>
<p class="font-12 color-606266">{{ uploadType == 1 || uploadType == 2 ? '上传图片' : '上传视频' }}</p>
<p class="font-12 color-606266">{{ uploadType == 1 || uploadType == 2 || uploadType == 4 ? '上传图片' : '上传视频' }}</p>
</div>
<!-- <el-progress v-if="videoFlag == true" type="circle" :percentage="videoUploadPercent" style="margin-top:30px;"></el-progress> -->
</el-upload>
......@@ -34,6 +34,9 @@
<p v-if="uploadType == 3" class="upload-tip color-909399 font-12">
视频支持MP4格式,大小不超过10M,上传企业微信后3天内有效
</p>
<p v-if="uploadType == 4" class="upload-tip color-909399 font-12">
建议尺寸:520×416,支持png、jpg、jpeg格式,大小不超过1M
</p>
<!-- 图片预览 -->
<!-- <vue-gic-img-preview :imgUrl="imgUrl" :imgShowFlag="imgShowFlag" @hideImage="hideImage"></vue-gic-img-preview> -->
</div>
......@@ -67,7 +70,7 @@ export default {
},
uploadType: {
type: [Number, String],
default: 1 // 1.图片 2.网页 3.视频
default: 1 // 1.图片 2.网页 3.视频 4小程序
}
},
data() {
......@@ -130,10 +133,10 @@ export default {
const isJPG = file.type === 'image/jpeg' || file.type === 'image/jpg' || file.type === 'image/png';
const isMP4 = file.type == 'video/mp4';
const isLt2M = file.size / 1024 / 1024 < that.uploadLimit;
if ((that.uploadType == 1 || that.uploadType == 2) && !isJPG) {
if ((that.uploadType == 1 || that.uploadType == 2 || that.uploadType == 4) && !isJPG) {
that.$message.error('上传图片支持png、jpg、jpeg格式!');
}
if ((that.uploadType == 1 || that.uploadType == 2) && !isLt2M) {
if ((that.uploadType == 1 || that.uploadType == 2 || that.uploadType == 4) && !isLt2M) {
that.$message.error(`上传图片大小不能超过 ${that.uploadLimit}MB!`);
}
if (that.uploadType == 3 && !isMP4) {
......@@ -148,11 +151,11 @@ export default {
return (
isJPG &&
isLt2M &&
new Promise(function(resolve, reject) {
new Promise(function (resolve, reject) {
let reader = new FileReader();
reader.onload = function(event) {
reader.onload = function (event) {
let image = new Image();
image.onload = function() {
image.onload = function () {
/* eslint-disable */
let width = this.width;
let height = this.height;
......
......@@ -70,15 +70,15 @@ export const constantRouterMap = [{
component: _import('business', 'contacts')
},
/* {
path: '/orgStructSet',
name: '组织架构管理',
component: _import('business', 'orgStructSet')
},
{
path: '/recycle',
name: '组织架构管理',
component: _import('business', 'recycle')
}, */
path: '/orgStructSet',
name: '组织架构管理',
component: _import('business', 'orgStructSet')
},
{
path: '/recycle',
name: '组织架构管理',
component: _import('business', 'recycle')
}, */
{
path: '/syncLog',
name: '通讯录日志',
......@@ -136,33 +136,49 @@ export const constantRouterMap = [{
]
},
// 销售线索
// {
// path: '/salesleads',
// name: '销售线索',
// redirect: 'storeList',
// component: _import('salesleads', 'index'),
// children: [{
// path: '/storeList',
// name: '门店视图',
// component: _import('salesleads', 'storeList'),
// },
// {
// path: '/storeDetail/:id',
// name: '门店视图',
// component: _import('salesleads', 'storeDetail')
// },
// {
// path: '/salesTaskList',
// name: '计划视图',
// component: _import('salesleads', 'taskList'),
// },
// {
// path: '/salesleadsSet',
// name: '销售线索设置',
// component: _import('salesleads', 'salesleadsSet')
// }
// ]
// },
{
path: '/salesleads',
name: '销售线索',
redirect: 'grStoreList',
component: _import('salesleads', 'index'),
children: [
// {
// path: '/storeList',
// name: '门店视图',
// component: _import('salesleads', 'storeList'),
// },
// {
// path: '/storeDetail/:id',
// name: '门店视图',
// component: _import('salesleads', 'storeDetail')
// },
// {
// path: '/salesTaskList',
// name: '计划视图',
// component: _import('salesleads', 'taskList'),
// },
// {
// path: '/salesleadsSet',
// name: '销售线索设置',
// component: _import('salesleads', 'salesleadsSet')
// },
{
path: '/grStoreList', // 群发任务-门店视图
name: '门店视图',
component: _import('salesleads', 'grStoreList')
},
{
path: '/grStoreDetail/:id', // 群发任务-门店视图-任务详情
name: '门店视图',
component: _import('salesleads', 'grStoreDetail')
},
{
path: '/grTaskList', // 群发任务-计划视图
name: '计划视图',
component: _import('salesleads', 'grTaskList')
}
]
},
{
// 企业数据
path: '/enterpriseData',
......@@ -213,10 +229,10 @@ export const constantRouterMap = [{
component: _import('apps', 'index'),
children: [
/* {
path: '/appcenter',
name: '企业应用中心',
component: _import('enterpriseApp', 'appcenter')
}, */
path: '/appcenter',
name: '企业应用中心',
component: _import('enterpriseApp', 'appcenter')
}, */
/* 我的顾客应用 */
{
path: '/mycustomer',
......@@ -542,4 +558,4 @@ export default new Router({
// mode:'history',
routes: constantRouterMap,
scrollBehavior: () => ({ y: 0 })
});
});
\ No newline at end of file
......@@ -23,8 +23,8 @@
<template v-for="(item, index) in groupData">
<li class="group-cell" :key="index + 'group'">
<div class="cursor-pointer group-cell-div" @click.stop="selectGroup(item)">
<span :class="['color-c0c4cc font-12 cursor-pointer', item.children.length ? 'color-c0c4cc' : 'color-transparent', item.expand ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"></span><span :class="['group-name font-14 color-606266 p-l-10', currentCategoryId == item.categoryId ? 'current-group' : '']">{{ item.categoryName }}</span
><el-popover placement="bottom" width="75" trigger="hover" popper-class="group-popover">
<span :class="['color-c0c4cc font-12 cursor-pointer', item.children.length ? 'color-c0c4cc' : 'color-transparent', item.expand ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"></span><span :class="['group-name font-14 color-606266 p-l-10', currentCategoryId == item.categoryId ? 'current-group' : '']">{{ item.categoryName }}</span>
<el-popover placement="bottom" width="75" trigger="hover" popper-class="group-popover">
<ul>
<li class="line-h-32 font-14 color-606266" @click.stop="addChildGroup(item)">新增子分组</li>
<li class="line-h-32 font-14 color-606266" @click.stop="editGroup(item)">编辑</li>
......@@ -37,8 +37,8 @@
<template v-for="(itemTwo, ind) in item.children">
<li class="group-cell" :key="ind + 'group'">
<div class="cursor-pointer group-cell-div" @click.stop="selectGroup(itemTwo)">
<span :class="['font-12 cursor-pointer', itemTwo.children.length ? 'color-c0c4cc' : 'color-transparent', itemTwo.expand ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"></span><span :class="['group-name font-14 color-606266 p-l-10', currentCategoryId == itemTwo.categoryId ? 'current-group' : '']">{{ itemTwo.categoryName }}</span
><el-popover placement="bottom" width="75" trigger="hover" popper-class="group-popover">
<span :class="['font-12 cursor-pointer', itemTwo.children.length ? 'color-c0c4cc' : 'color-transparent', itemTwo.expand ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"></span><span :class="['group-name font-14 color-606266 p-l-10', currentCategoryId == itemTwo.categoryId ? 'current-group' : '']">{{ itemTwo.categoryName }}</span>
<el-popover placement="bottom" width="75" trigger="hover" popper-class="group-popover">
<ul>
<li class="line-h-32 font-14 color-606266" @click.stop="addChildGroup(itemTwo)">新增子分组</li>
<li class="line-h-32 font-14 color-606266" @click.stop="editGroup(itemTwo)">编辑</li>
......@@ -51,8 +51,8 @@
<template v-for="(itemThree, i) in itemTwo.children">
<li class="group-cell" :key="i + 'group'">
<div class="cursor-pointer group-cell-div" @click.stop="selectGroup(itemThree)">
<span :class="['font-12 cursor-pointer color-transparent', itemThree.expand ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"></span><span :class="['group-name font-14 color-606266 p-l-10', currentCategoryId == itemThree.categoryId ? 'current-group' : '']">{{ itemThree.categoryName }}</span
><el-popover placement="bottom" width="75" trigger="hover" popper-class="group-popover">
<span :class="['font-12 cursor-pointer color-transparent', itemThree.expand ? 'el-icon-caret-bottom' : 'el-icon-caret-right']"></span><span :class="['group-name font-14 color-606266 p-l-10', currentCategoryId == itemThree.categoryId ? 'current-group' : '']">{{ itemThree.categoryName }}</span>
<el-popover placement="bottom" width="75" trigger="hover" popper-class="group-popover">
<ul>
<!-- <li class="line-h-32 font-14 color-606266" @click.stop="addChildGroup(itemThree)">新增子分组</li> -->
<li class="line-h-32 font-14 color-606266" @click.stop="editGroup(itemThree)">编辑</li>
......@@ -75,8 +75,13 @@
<div class="material-right">
<div class="material-table">
<div class="add-btn-wrap">
<el-button v-if="activeName == 1" type="primary" @click="addText">新建文本</el-button><el-button v-if="activeName == 2" type="primary" @click="addImage">新建图片</el-button><el-button v-if="activeName == 3" type="primary" @click="addWeb">新建网页</el-button><el-button v-if="activeName == 4" type="primary" @click="addVideo">新建视频</el-button><el-button v-if="activeName == 5" type="primary" @click="addFile">新建文件</el-button
><el-select style="vertical-align: top;" class="m-l-10" v-model="multOpt" placeholder="批量操作" @change="changeOpt">
<el-button v-if="activeName == 1" type="primary" @click="addText">新建文本</el-button>
<el-button v-if="activeName == 2" type="primary" @click="addImage">新建图片</el-button>
<el-button v-if="activeName == 3" type="primary" @click="addWeb">新建网页</el-button>
<el-button v-if="activeName == 4" type="primary" @click="addVideo">新建视频</el-button>
<el-button v-if="activeName == 5" type="primary" @click="addFile">新建文件</el-button>
<el-button v-if="activeName == 6" type="primary" @click="addApp">新建小程序</el-button>
<el-select style="vertical-align: top;" class="m-l-10" v-model="multOpt" placeholder="批量操作" @change="changeOpt">
<el-option label="批量删除" value="1"></el-option>
<el-option label="批量转移" value="2"></el-option>
</el-select>
......@@ -102,6 +107,10 @@
<span slot="label"><i class="iconfont iconwenjian p-r-5 "></i>文件</span>
<file-table v-loading="loading" :currentPage="currentPage" :pageSize="pageSize" :total="total" :categoryId="currentCategoryId" :textTableData="tableData" @handleSelectionChange="handleSelText" @refreshTable="refreshTable" @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange"></file-table>
</el-tab-pane>
<el-tab-pane label="小程序" name="6">
<span slot="label"><i class="iconfont iconxiaochengxu p-r-5 "></i>小程序</span>
<apps-table v-loading="loading" :currentPage="currentPage" :pageSize="pageSize" :total="total" :categoryId="currentCategoryId" :textTableData="tableData" @handleSelectionChange="handleSelText" @refreshTable="refreshTable" @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange"></apps-table>
</el-tab-pane>
</el-tabs>
</div>
</div>
......@@ -113,6 +122,7 @@
<web-edit v-if="webShow" :categoryId="currentCategoryId" @closeText="closeText" @submitText="submitText"></web-edit>
<video-edit v-if="videoShow" :categoryId="currentCategoryId" @closeText="closeText" @submitText="submitText"></video-edit>
<file-edit v-if="fileShow" :categoryId="currentCategoryId" @closeText="closeText" @submitText="submitText"></file-edit>
<apps-edit v-if="appsShow" :categoryId="currentCategoryId" @closeText="closeText" @submitText="submitText"></apps-edit>
<select-group v-if="multTrans" :materialIds="materialIds" @closeGroup="closeGroup" @submitGroup="submitGroup"></select-group>
</div>
</template>
......@@ -122,12 +132,14 @@ import textEdit from '@/components/set/text-edit.vue';
import imageEdit from '@/components/set/image-edit.vue';
import webEdit from '@/components/set/web-edit.vue';
import videoEdit from '@/components/set/video-edit.vue';
import appsEdit from '@/components/set/apps-edit.vue';
import fileEdit from '@/components/set/file-edit.vue';
import textTable from '@/components/set/text-table.vue';
import imageTable from '@/components/set/image-table.vue';
import webTable from '@/components/set/web-table.vue';
import videoTable from '@/components/set/video-table.vue';
import fileTable from '@/components/set/file-table.vue';
import appsTable from '@/components/set/apps-table.vue';
import groupDialog from '@/components/set/group-dialog.vue';
import { getRequest, postRequest } from '@/api/api';
import { _debounce } from '@/common/js/public';
......@@ -158,6 +170,7 @@ export default {
multData: [],
// 文本
textShow: false,
appsShow: false,
imageShow: false,
webShow: false,
videoShow: false,
......@@ -237,6 +250,7 @@ export default {
that.webShow = false;
that.videoShow = false;
that.fileShow = false;
that.appsShow = false;
},
submitText() {
const that = this;
......@@ -245,6 +259,7 @@ export default {
that.webShow = false;
that.videoShow = false;
that.fileShow = false;
that.appsShow = false;
that.refreshTable();
},
/**
......@@ -276,6 +291,13 @@ export default {
that.fileShow = true;
},
/**
* 小程序
*/
addApp() {
const that = this;
that.appsShow = true;
},
/**
* 刷新列表
*/
refreshTable() {
......@@ -519,7 +541,7 @@ export default {
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: { groupDialog, selectGroup, textTable, imageTable, webTable, videoTable, fileTable, textEdit, imageEdit, webEdit, videoEdit, fileEdit }
components: { groupDialog, selectGroup, textTable, imageTable, webTable, videoTable, fileTable, appsTable, textEdit, imageEdit, webEdit, videoEdit, fileEdit, appsEdit }
};
</script>
<style type="text/scss" lang="scss" scoped>
......
......@@ -515,7 +515,6 @@ export default {
ele.openFlag = false;
});
that.noPurchaseApp = JSON.parse(JSON.stringify(resData.result.close)) || [];
return;
}
errMsg.errorMsg(resData);
......
......@@ -57,9 +57,29 @@ export default {
}
],
tabListData: [
// {
// tabId: '0',
// tabName: '销售线索记录',
// icon: 'iconjichushezhi',
// children: [
// {
// tabId: '1',
// tabName: '门店视图'
// },
// {
// tabId: '2',
// tabName: '计划视图'
// }
// ]
// },
// {
// tabId: '3',
// tabName: '销售线索设置',
// icon: 'iconribaoshezhi'
// }
{
tabId: '0',
tabName: '销售线索记录',
tabName: '群发任务记录',
icon: 'iconjichushezhi',
children: [
{
......@@ -71,11 +91,6 @@ export default {
tabName: '计划视图'
}
]
},
{
tabId: '3',
tabName: '销售线索设置',
icon: 'iconribaoshezhi'
}
]
};
......@@ -110,16 +125,13 @@ export default {
that.activeTab = item.tabId;
switch (item.tabId) {
case '0':
that.changeRoute(`/storeList`);
that.changeRoute(`/grStoreList`);
break;
case '1':
that.changeRoute(`/storeList`);
that.changeRoute(`/grStoreList`);
break;
case '2':
that.changeRoute(`/salesTaskList`);
break;
case '3':
that.changeRoute(`/salesleadsSet`);
that.changeRoute(`/grTaskList`);
break;
}
},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment