Commit 432a8946 by 无尘

feat: 增加公告新内容

parent 802420ee
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2018-10-10 14:44:45 * @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2018-10-10 14:44:45 * @LastEditTime: 2019-10-22 14:02:25
*/ */
module.exports = { module.exports = {
proxyList: { proxyList: {
...@@ -29,6 +29,13 @@ module.exports = { ...@@ -29,6 +29,13 @@ module.exports = {
'^/haoban-app-announcement-web': '' '^/haoban-app-announcement-web': ''
} }
}, },
'/haoban-app-tel-task-web/': {
target: 'https://www.gicdev.com/haoban-app-tel-task-web/',
changeOrigin: true,
pathRewrite: {
'^/haoban-app-tel-task-web': ''
}
},
'/api-mall/': { '/api-mall/': {
target: 'http://gicdev.demogic.com/api-mall/', target: 'http://gicdev.demogic.com/api-mall/',
changeOrigin: true, changeOrigin: true,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-03-20 14:36:37 * @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-21 17:56:57 * @LastEditTime: 2019-10-23 15:07:48
--> -->
<!-- <!--
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<span class="font-14 color-909399">注:保存勾选项后,门店导购和店长可查看本门店作为开卡门店名下会员</span> <span class="font-14 color-909399">注:保存勾选项后,门店导购和店长可查看本门店作为开卡门店名下会员</span>
</div> </div>
<div class="m-b-20"> <div class="m-b-20">
<el-checkbox class="w-195" v-model="myCustomData.openCardStoreFlag">展示已认证会员</el-checkbox> <el-checkbox class="w-195" v-model="myCustomData.isSeeAuthMember">展示已认证会员</el-checkbox>
<span class="font-14 color-909399">注:保存勾选项后,门店导购和店长可查看本门店已认证会员</span> <span class="font-14 color-909399">注:保存勾选项后,门店导购和店长可查看本门店已认证会员</span>
</div> </div>
<div class="m-b-20"> <div class="m-b-20">
...@@ -195,6 +195,7 @@ export default { ...@@ -195,6 +195,7 @@ export default {
minorStoreFlag: false, // 协管门店显示,1显示0不显示 minorStoreFlag: false, // 协管门店显示,1显示0不显示
openCardStoreFlag: false, // 开卡门店显示,1显示0不显示 openCardStoreFlag: false, // 开卡门店显示,1显示0不显示
clerkSeeOtherFlag: false, // 导购查看其他导购,1显示0不显示 clerkSeeOtherFlag: false, // 导购查看其他导购,1显示0不显示
isSeeAuthMember: false,
allowGuideContact: false, allowGuideContact: false,
allowGuideMobile: false, allowGuideMobile: false,
allowGuideMessage: false, allowGuideMessage: false,
...@@ -547,6 +548,7 @@ export default { ...@@ -547,6 +548,7 @@ export default {
para['allowGuideMobile'] = !!that.myCustomData['allowGuideMobile'] ? 1 : 0; para['allowGuideMobile'] = !!that.myCustomData['allowGuideMobile'] ? 1 : 0;
para['allowGuideMessage'] = !!that.myCustomData['allowGuideMessage'] ? 1 : 0; para['allowGuideMessage'] = !!that.myCustomData['allowGuideMessage'] ? 1 : 0;
para['allowGuideOnlineChat'] = !!that.myCustomData['allowGuideOnlineChat'] ? 1 : 0; para['allowGuideOnlineChat'] = !!that.myCustomData['allowGuideOnlineChat'] ? 1 : 0;
para['isSeeAuthMember'] = !!that.myCustomData['isSeeAuthMember'] ? 1 : 0;
para.chatFlag = that.myCustomData.chatFlag; // 总的 para.chatFlag = that.myCustomData.chatFlag; // 总的
para.isMessageRemind = that.myCustomData.isMessageRemind; // 短信 para.isMessageRemind = that.myCustomData.isMessageRemind; // 短信
para.messageRemindTime = that.myCustomData.messageRemindTime; para.messageRemindTime = that.myCustomData.messageRemindTime;
...@@ -556,7 +558,6 @@ export default { ...@@ -556,7 +558,6 @@ export default {
para.isIntegralGoodMessage = that.myCustomData.isIntegralGoodMessage; para.isIntegralGoodMessage = that.myCustomData.isIntegralGoodMessage;
url = '/haoban-app-member-web/customer/save-member-show-setting'; url = '/haoban-app-member-web/customer/save-member-show-setting';
} }
postRequest(url, para) postRequest(url, para)
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
...@@ -640,6 +641,7 @@ export default { ...@@ -640,6 +641,7 @@ export default {
resData.result.allowGuideMobile = resData.result.allowGuideMobile == 1 ? true : false; resData.result.allowGuideMobile = resData.result.allowGuideMobile == 1 ? true : false;
resData.result.allowGuideMessage = resData.result.allowGuideMessage == 1 ? true : false; resData.result.allowGuideMessage = resData.result.allowGuideMessage == 1 ? true : false;
resData.result.allowGuideOnlineChat = resData.result.allowGuideOnlineChat == 1 ? true : false; resData.result.allowGuideOnlineChat = resData.result.allowGuideOnlineChat == 1 ? true : false;
resData.result.isSeeAuthMember = resData.result.isSeeAuthMember == 1 ? true : false;
resData.result.searchFlag = resData.result.searchFlag == 1 ? true : false; resData.result.searchFlag = resData.result.searchFlag == 1 ? true : false;
that.myCustomData = resData.result; that.myCustomData = resData.result;
} }
......
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-10-22 15:12:41
* @LastEditors: 无尘
* @LastEditTime: 2019-10-23 12:12:32
-->
<!--
<notice-preview ref="noticePreview" v-model="previewVisible"></notice-preview>
import noticePreview from '@/components/app/notice-preview.vue';
components: {
noticePreview
}
previewVisible: false,
-->
<template>
<div class="qr-dialog-content" style="opacity: 1;" v-show="value">
<div class="qr-mask" @click.stop="closeDialog"></div>
<div class="qr-dialog border-box">
<div class="qr-dialog-body border-box">
<h2 class="font-20 color-222">{{ noticeData.title }}</h2>
<div class="notice-date flex flex-space-between">
<div class="notice-date-left font-10 color-88949C">{{ noticeData.announcementId ? noticeData.sendTime : new Date().getTime() | formatTimeYmdHms }}</div>
<div class="notice-date-right font-10 color-4d7fd0">
<span>未读 {{ noticeData.announcementId ? noticeData.sendCount - noticeData.readCount : 0 }}</span
><span class="p-lr-5 color-a5afb8">|</span><span>已读 {{ noticeData.announcementId ? noticeData.readCount : 0 }}</span>
</div>
</div>
<div class="notice-body border-box color-222" v-htmlContent="noticeData.content"></div>
</div>
</div>
<!-- 关闭 -->
<div class="qr-dialog__hd">
<i class="el-icon-plus" @click.stop="closeDialog"></i>
</div>
</div>
</template>
<script>
export default {
name: 'notice-preview',
props: {
value: {
type: Boolean,
default() {
return false;
}
},
noticePreviewData: {
type: Object,
default() {
return {
announcementId: '',
sendTime: '',
sendCount: 0,
readCount: 0,
adminCheck: false,
stroreCheck: false,
adminStructor: [],
storeStructor: [],
receiveType: '0',
labelId: '',
title: '',
img: '',
content: '',
sendType: '0',
attachment: [],
pageTop: false
};
}
}
},
directives: {
htmlContent: {
// 指令的定义
bind: function(el, param) {
el.innerHTML = param.value;
},
update: function(el, param) {
el.innerHTML = param.value;
}
}
},
data() {
return {
noticeData: {
announcementId: '',
sendCount: 0,
readCount: 0,
title: '',
content: ''
}
};
},
methods: {
/**
* 关闭预览窗口
*/
closeDialog() {
const that = this;
that.$emit('input', false);
}
},
watch: {
noticePreviewData(newData, oldData) {
const that = this;
that.noticeData = newData;
}
},
mounted() {
const that = this;
that.noticeData = that.noticePreviewData;
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.font-10 {
font-size: 10px;
}
.color-222 {
color: #222222;
}
.color-88949C {
color: #88949c;
}
.color-4d7fd0 {
color: #4d7fd0;
}
.color-a5afb8 {
color: #a5afb8;
}
.p-lr-5 {
padding: 0 5px;
}
.qr-mask {
position: fixed;
z-index: 1000;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
cursor: pointer;
}
.qr-dialog {
position: fixed;
z-index: 5000;
width: 220px;
height: 440px;
padding: 58px 12px 30px 12px;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
background-color: #fff;
text-align: center;
border-radius: 3px;
overflow: hidden;
background: url('../../assets/iPhone_preview.png') no-repeat;
.qr-dialog-body {
position: relative;
width: 100%;
height: 100%;
padding: 15px 8px;
// background: #ccc;
overflow-y: auto;
.notice-body {
padding: 20px 0;
}
}
.qr-dialog__bd {
padding: 0 1.6em 0.8em;
min-height: 40px;
font-size: 15px;
line-height: 1.3;
word-wrap: break-word;
word-break: break-all;
color: #808080;
#qrcode {
display: -webkit-flex;
display: flex;
justify-content: center;
align-items: center;
}
.qr-dialog__p {
padding: 20px 0;
font-size: 14px;
color: #606266;
}
}
}
.qr-dialog__hd {
position: fixed;
width: 45px;
height: 45px;
border: 1px solid rgba(255, 255, 255, 1);
border-radius: 50%;
bottom: 15%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
z-index: 5001;
i {
position: absolute;
top: 0;
right: 0;
display: block;
width: 45px;
height: 45px;
line-height: 45px;
text-align: center;
color: #fff;
font-size: 20px;
cursor: pointer;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
}
</style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-09-18 15:24:50 * @Date: 2019-09-18 15:24:50
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-16 00:13:15 * @LastEditTime: 2019-10-23 15:10:17
--> -->
<!-- <!--
...@@ -104,7 +104,7 @@ components: { ...@@ -104,7 +104,7 @@ components: {
<div v-if="activeTab == 4" class="online-chat-goods"> <div v-if="activeTab == 4" class="online-chat-goods">
<div role="alert" class="el-alert el-alert--info"> <div role="alert" class="el-alert el-alert--info">
<i class="el-alert__icon el-icon-info font-12 color-1890ff"></i> <i class="el-alert__icon el-icon-info font-12 color-1890ff"></i>
<div class="el-alert__content"><span class="el-alert__title color-606266 font-14">配置说明:选取达摩微商城及积分商城中的图文,配置后,导购可以选择对应的商品发送给会员</span></div> <div class="el-alert__content"><span class="el-alert__title color-606266 font-14">配置说明:选取达摩微商城及积分商城中的商品,配置后,导购可以选择对应的商品发送给会员</span></div>
</div> </div>
<div class="m-t-20"><span class="font-14 color-303133">达摩微商城</span><el-switch class="m-l-10" v-model="chatData.isGoodMessage" active-text="" inactive-text="" @change="postSave(brandId)"> </el-switch><span class="font-14 color-303133 p-l-40">积分商城</span><el-switch class="m-l-10" v-model="chatData.isIntegralGoodMessage" active-text="" inactive-text="" @change="postSave(brandId)"> </el-switch></div> <div class="m-t-20"><span class="font-14 color-303133">达摩微商城</span><el-switch class="m-l-10" v-model="chatData.isGoodMessage" active-text="" inactive-text="" @change="postSave(brandId)"> </el-switch><span class="font-14 color-303133 p-l-40">积分商城</span><el-switch class="m-l-10" v-model="chatData.isIntegralGoodMessage" active-text="" inactive-text="" @change="postSave(brandId)"> </el-switch></div>
<div v-if="chatData.isGoodMessage || chatData.isIntegralGoodMessage" class="m-t-20"> <div v-if="chatData.isGoodMessage || chatData.isIntegralGoodMessage" class="m-t-20">
...@@ -319,7 +319,8 @@ export default { ...@@ -319,7 +319,8 @@ export default {
allowGuideContact: that.chatData.allowGuideContact, allowGuideContact: that.chatData.allowGuideContact,
allowGuideMobile: that.chatData.allowGuideMobile, allowGuideMobile: that.chatData.allowGuideMobile,
allowGuideMessage: that.chatData.allowGuideMessage, allowGuideMessage: that.chatData.allowGuideMessage,
allowGuideOnlineChat: that.chatData.allowGuideOnlineChat allowGuideOnlineChat: that.chatData.allowGuideOnlineChat,
isSeeAuthMember: that.chatData.isSeeAuthMember
}; };
postRequest('/haoban-app-member-web/customer/save-member-show-setting', para) postRequest('/haoban-app-member-web/customer/save-member-show-setting', para)
.then(res => { .then(res => {
......
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2019-10-23 18:19:35
-->
<!--
<taskView :brandId="brandId" activeGroupId></taskView>
-->
<template>
<div>
<div class="daily-set-content boder-box">
<div class="table-condition flex flex-space-between m-b-23">
<div class="table-condition-left">
<el-input placeholder="请输入门店名称" v-model="conditionObj.searchInput" class="w-264" style="width: 264px;" @keyup.native="value => toInput(value, conditionObj.searchInput)"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
<span class="condition-tips font-12 color-909399 p-l-10">仅包含话务任务记录</span>
</div>
<div class="table-condition-right">
<el-button type="danger" @click="multDel">批量删除</el-button>
<el-button type="primary" @click="exportExcel"><i class="iconfont icon-icon_yunxiazai p-r-6"></i>导出</el-button>
</div>
</div>
<!--<div class="view-classify m-b-20">
<el-radio-group v-model="conditionObj.tableType" @change="changeTable">
<el-radio-button label="1" name="门店视图">门店视图</el-radio-button>
<el-radio-button label="2" name="话务任务视图">话务任务视图</el-radio-button>
</el-radio-group>
</div>-->
<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="35"> </el-table-column>
<el-table-column width="25">
<template slot="header" slot-scope="scope">
<el-dropdown style="line-height: 10px; padding: 0; margin-left: -15px; transform: translateY(4px); -webkit-transform: translateY(4px);" @command="handleCommand" placement="bottom-start">
<span class="el-dropdown-link"><i class="el-icon-arrow-down el-icon--right"></i> </span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="0"><span :style="{ color: selectRadio == 0 ? '#1890ff' : '#606266' }">选择当页</span></el-dropdown-item>
<el-dropdown-item command="1"><span :style="{ color: selectRadio == 1 ? '#1890ff' : '#606266' }">选择全部</span></el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
<template slot-scope="scope"> </template>
</el-table-column>
<el-table-column label="任务名称" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.storeName }}</template>
</el-table-column>
<el-table-column prop="" label="已完成(含放弃)" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.completedCount }}</template>
</el-table-column>
<el-table-column prop="" label="完成率(含放弃)" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.completedRate }}</template>
</el-table-column>
<el-table-column prop="" label="待完成" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.noCompletedCount }}</template>
</el-table-column>
<el-table-column prop="" label="逾期中" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.overdueCount }}</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="toDetail(scope.$index, scope.row)">查看详情</el-button>
</template>
</el-table-column>
</el-table>
<div class="block common-wrap__page text-right m-t-24" v-if="tableData.length != 0">
<el-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"> </el-pagination>
</div>
</div>
<multiple-del :showDialog="showDialog" :detailFlag="false" @hideDialog="hideDialog"> </multiple-del>
</div>
</template>
<script>
// import navCrumb from '@/components/nav/nav.vue';
import appDetail from '@/components/app/app-detail.vue';
import vueSelectStore from 'components/common/vueSelectStore';
import commonDetailTop from '@/components/app/common-detail-top.vue';
import multipleDel from '@/components/app/cloudDaily/multiple-del.vue';
import { getRequest, postRequest, postExcel } from '@/api/api';
import { _debounce } from '@/common/js/public';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
export default {
name: 'taskView',
props: {
brandId: {
type: String,
default() {
return '';
}
},
activeGroupId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
tableH: window.screen.availHeight - 464 - 126,
activeTab: '1',
activeBrand: this.brandId, // 商户(品牌) id
activeGroup: this.activeGroupId, // 商户(品牌) groupId
topMenuData: [
{
id: '1',
name: '话务任务记录'
}
],
activeId: '1',
showDialog: false,
// 条件
conditionObj: {
tableType: '1',
searchInput: '',
storeGroup: [],
storeType: '',
dateRange: []
},
storeTypeOptions: [
{
value: '',
label: '所有'
},
{
value: '0',
label: '自营'
},
{
value: '1',
label: '联营'
},
{
value: '2',
label: '代理'
},
{
value: '3',
label: '代销'
},
{
value: '4',
label: '托管'
}
],
selectRadio: 0, // 选择当页/选择全部
tableData: [
// {
// storeName: '2016-05-03',
// taskCount: '王小虎',
// completed: '10',
// completionRate: '10',
// unCompleted: '10',
// overdue: '1',
// taskId: '123',
// storeId: '123456',
// address: '上海市普陀区金沙江路 1518 弄'
// }
],
multipleSelection: [],
// 分页参数
currentPage: 1,
pageSize: 20,
total: 0,
// 门店选择
appScene: 2,
defaultStoreList: [],
storeTreeSet: {
isSelectPerson: false, // 控制只能选部门(false)
dialogVisible: false, // 控制显示/隐藏
isSingle: false // 是否单选
}
};
},
computed: {},
methods: {
/**
* 改变视图
*/
changeTable(e) {
const that = this;
that.currentPage = 1;
that.getTableList();
},
/**
* 显示选择本页/全部
*/
handleCommand(command) {
this.selectRadio = command;
},
/**
* 返回 的 brandId
*/
setSelectTab(item) {
let that = this;
that.activeTab = item.tabId;
},
/**
* 输入
*/
toInput: _debounce(function(e, value) {
let that = this;
that.currentPage = 1;
that.getTableList();
}, 500),
/**
* 门店类型
*/
changeStoreType() {
let that = this;
that.currentPage = 1;
that.getTableList();
},
/**
* 日期
*/
changeDate(e) {
let that = this;
if (!e) {
that.conditionObj.dateRange = [];
}
that.currentPage = 1;
that.getTableList();
},
/**
* 表格选择
*/
handleSelectionChange(val) {
this.multipleSelection = val;
},
/**
* 删除选的部门
*/
delDepart(index, item) {
let that = this;
item.splice(index, 1);
that.currentPage = 1;
that.getTableList();
},
/**
* 批量删除
*/
multDel() {
let that = this;
if (!that.multipleSelection.length) {
that.$message.error({
duration: 1000,
message: '请选择删除项'
});
return false;
}
that.showDialog = true;
},
/**
* 批量删除---弹窗关闭
*/
hideDialog(obj) {
let that = this;
that.showDialog = false;
if (!Object.keys(obj).length) {
return false;
}
that.postMultDel(obj);
},
postMultDel(obj) {
let that = this;
let storeGroups = [];
let filterStoreIds = [];
that.conditionObj.storeGroup.forEach(ele => {
if (ele.type == 2) {
storeGroups.push(ele.groupId);
}
if (ele.type == 3) {
filterStoreIds.push(ele.storeId);
}
});
if (!that.conditionObj.dateRange) {
that.conditionObj.dateRange = [];
}
let para = {
search: that.conditionObj.searchInput || '', // 搜索字段
filterStoreIds: filterStoreIds.join(',') || '', // 门店分组, 门店
storeGroupIds: storeGroups.join(',') || '', // 门店分组,数组
storeIds: that.multipleSelection.map(ele => ele.storeId).join(',') || '', // 门店分组,数组
storeType: that.conditionObj.storeType || '', //门店类型
startDate: that.conditionObj.dateRange[0] || '',
endDate: that.conditionObj.dateRange[1] || '',
brandId: that.activeBrand, // 品牌 id
delTaskStatus: obj.delOptFlag, // 0:仅删除逾期任务,1:删除所有待完成任务
reason: obj.reason, // 备注
isAll: that.selectRadio // 0:当页,1:所有
// taskType: 1 //0不良评价,1话务任务
};
postRequest('/haoban-app-tel-task-web/task/batch-del-store-task-list', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('删除成功', 'success');
that.getTableList();
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 导出
*/
exportExcel() {
let that = this;
let storeGroups = [];
let filterStoreIds = [];
that.conditionObj.storeGroup.forEach(ele => {
if (ele.type == 2) {
storeGroups.push(ele.groupId);
}
if (ele.type == 3) {
filterStoreIds.push(ele.storeId);
}
});
let para = {
search: that.conditionObj.searchInput || '', // 搜索字段
filterStoreIds: filterStoreIds.join(',') || '', // 门店分组, 门店
storeGroupIds: storeGroups.join(',') || '', // 门店分组,数组
// storeIds: that.multipleSelection.map(ele => ele.storeId).join(',') || '', // 门店分组,数组
storeType: that.conditionObj.storeType || '', //门店类型
startDate: !!that.conditionObj.dateRange ? that.conditionObj.dateRange[0] : '',
endDate: !!that.conditionObj.dateRange ? that.conditionObj.dateRange[1] : '',
brandId: that.activeBrand // 品牌 id
// taskType: 1 //0不良评价,1话务任务
};
/* let urlSource = `search=${para.search}&filterStoreIds=${para.filterStoreIds}&storeGroupIds=${para.storeGroupIds}&storeType=${para.storeType}&startDate=${para.startDate}&endDate=${para.endDate}&brandId=${para.brandId}`;
window.open(`${window.location.origin}/haoban-app-tel-task-web/task/export-store-task-list?${urlSource}`); */
postExcel('/haoban-app-tel-task-web/task/export-store-task-list', para)
.then(res => {
if (!res.data) {
errMsg.errorMsg('暂无数据');
return false;
}
// let resData = res.data;
const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' });
const fileName = `${that.tableData[0] ? that.tableData[0].storeName : ''}门店任务报表.csv`;
const elink = document.createElement('a');
elink.download = fileName;
elink.style.display = 'none';
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
elink.click();
URL.revokeObjectURL(elink.href); // 释放URL 对象
document.body.removeChild(elink);
// errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 分页---页码变化
*/
handleSizeChange(val) {
const that = this;
that.pageSize = val;
that.getTableList();
},
/**
* 分页---当前页变化
*/
handleCurrentChange(val) {
const that = this;
that.currentPage = val;
// let fullPath = that.$route.fullPath;
that.getTableList();
},
/**
* 弹窗显示事件
*/
showDialogLayer(type, selData) {
const that = this;
that.selectType = type;
that.changed = type;
that.defaultStoreList = selData;
that.storeTreeSet = {
dialogVisible: true,
isSingle: false,
isSelectPerson: false
};
},
/**
* 处理已选部门
*/
handleSelectedList(group) {
let that = this;
// type: 1:员工,2:部门,3:门店;
that.conditionObj.storeGroup = group;
that.getTableList();
},
/**
* 查看详情
*/
toDetail(index, row) {
let that = this;
that.$router.push(`taskDetail?storeId=${row.storeId}&appIcon=${that.$route.query.appIcon}`);
},
/**
* 获取列表数据
*/
getTableList(val) {
let that = this;
let storeGroups = [];
let filterStoreIds = [];
that.conditionObj.storeGroup.forEach(ele => {
if (ele.type == 2) {
storeGroups.push(ele.groupId);
}
if (ele.type == 3) {
filterStoreIds.push(ele.storeId);
}
});
if (!that.conditionObj.dateRange) {
that.conditionObj.dateRange = [];
}
let para = {
search: that.conditionObj.searchInput || '', // 搜索字段
filterStoreIds: filterStoreIds.join(',') || '', // 门店分组, 门店
storeGroupIds: storeGroups.join(',') || '', // 门店分组,分组
storeType: that.conditionObj.storeType || '', //门店类型
startDate: that.conditionObj.dateRange[0] || '',
endDate: that.conditionObj.dateRange[1] || '',
pageNum: that.currentPage, // 当前页
pageSize: that.pageSize, // 一页显示个数
brandId: that.activeBrand
// taskType: 1 //0不良评价,1话务任务
};
getRequest(that.conditionObj.tableType == 1 ? '/haoban-app-tel-task-web/task/store-task-list' : '/haoban-app-tel-task-web/task/store-task-list-view', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.tableData = resData.result.list || [];
that.total = resData.result.pageInfo.total;
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
initDataRange() {
let date = new Date();
let nowTime = date.getTime() - 90 * 24 * 3600 * 1000;
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
let newMonth = month < 10 ? '0' + month : month;
let startDate = new Date(nowTime);
let startYear = startDate.getFullYear();
let startMonth = startDate.getMonth() + 1;
let startDay = startDate.getDate() < 10 ? '0' + startDate.getDate() : startDate.getDate();
let startNewMonth = startMonth < 10 ? '0' + startMonth : startMonth;
return [`${startYear}-${startNewMonth}-${startDay}`, `${year}-${newMonth}-${day}`];
}
},
watch: {
brandId: function(newData, oldData) {
let that = this;
if (!!newData) {
that.activeBrand = newData;
that.getTableList();
}
},
activeGroupId: function(newData, oldData) {
let that = this;
if (!!newData) {
that.activeGroup = newData;
}
}
},
mounted() {
const that = this;
that.conditionObj.dateRange = that.initDataRange();
document.documentElement.style.backgroundColor = '#f0f2f5';
that.activeBrand = that.brandId;
if (!!this.brandId) {
that.$nextTick(() => {
that.getTableList();
});
}
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {
appDetail,
commonDetailTop,
vueSelectStore,
multipleDel
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.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: 16px;
.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 {
/deep/ .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>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-10-21 14:27:29 * @Date: 2019-10-21 14:27:29
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-21 16:30:48 * @LastEditTime: 2019-10-23 14:16:57
--> -->
<!-- <!--
...@@ -19,7 +19,7 @@ import reviewResultDetail from '@/components/review/review-result-detail.vue' ...@@ -19,7 +19,7 @@ import reviewResultDetail from '@/components/review/review-result-detail.vue'
<div v-show="customDialog"> <div v-show="customDialog">
<el-dialog class="edit-dialog" title="审核详情" :visible.sync="customDialog" width="600px" :before-close="handleClose"> <el-dialog class="edit-dialog" title="审核详情" :visible.sync="customDialog" width="600px" :before-close="handleClose">
<div class="edit-dialog-body"> <div class="edit-dialog-body">
<el-table :data="tableData" style="width: 100%"> <el-table :data="tableData" style="width: 100%" height="250">
<el-table-column prop="publishRecordId" label="审核事项" show-overflow-tooltip> </el-table-column> <el-table-column prop="publishRecordId" label="审核事项" show-overflow-tooltip> </el-table-column>
<el-table-column label="品牌" show-overflow-tooltip> <el-table-column label="品牌" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -52,22 +52,23 @@ import reviewResultDetail from '@/components/review/review-result-detail.vue' ...@@ -52,22 +52,23 @@ import reviewResultDetail from '@/components/review/review-result-detail.vue'
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination text-right m-t-14" v-if="!!totalCount">
<el-pagination small :page-size="pageSize" :current-page="currentPage" layout="prev, pager, next" :total="totalCount" @size-change="handleSizeChange" @current-change="handleCurrentChange"> </el-pagination>
</div>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
export default { export default {
name: 'record-list', name: 'record-list',
props: { props: {
detailShow: { detailShow: {
type: Boolean, type: Boolean,
default: false default: false
},
tableListData: {
type: Object,
default() {
return [];
}
} }
}, },
data() { data() {
...@@ -80,10 +81,7 @@ export default { ...@@ -80,10 +81,7 @@ export default {
remark: '描述内容', remark: '描述内容',
createTime: 1564455643252 createTime: 1564455643252
} */ } */
], ]
pageSize: 5,
currentPage: 1,
totalCount: 0
}; };
}, },
methods: { methods: {
...@@ -108,60 +106,16 @@ export default { ...@@ -108,60 +106,16 @@ export default {
const that = this; const that = this;
that.customDialog = false; that.customDialog = false;
that.$emit('hideDetailDialog'); that.$emit('hideDetailDialog');
},
/**
* 分页
*/
handleSizeChange(val) {
this.pageSize = val;
this.getData();
},
handleCurrentChange(val) {
this.currentPage = val;
this.getData();
},
/**
* 查看定义详情页
*/
handleShow(index, row) {
const that = this;
that.$router.push(`/apiListManageShow?editFlag=0&interfaceId=${row.interfaceId}&interfaceName=${row.interfaceName}&interfaceVersionId=${row.interfaceVersionId}&publishRecordId=${row.publishRecordId}&projectId=${row.projectId}&projectName=${that.$route.query.projectName}&interfaceGroupId=${row.interfaceGroupId}&interfaceGroupName=${that.$route.query.interfaceGroupName}`);
},
/**
* 获取数据
*/
getData() {
const that = this;
let para = {
pageNum: that.currentPage,
pageSize: that.pageSize,
version: that.formData.version,
sceneCode: that.formData.sceneCode,
interfaceId: that.formData.interfaceId
};
getRequest('/gateway-manage/page-api-publish-record', para)
.then(res => {
let resData = res.data;
if (resData.code == '0000') {
that.tableData = resData.result.result || [];
that.totalCount = resData.result.totalCount;
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
} }
}, },
watch: { watch: {
detailShow: function(newData, oldData) { detailShow: function(newData, oldData) {
const that = this; const that = this;
that.customDialog = newData; that.customDialog = newData;
},
tableListData: function(newData, oldData) {
const that = this;
that.tableData = newData;
} }
}, },
...@@ -169,6 +123,7 @@ export default { ...@@ -169,6 +123,7 @@ export default {
mounted() { mounted() {
const that = this; const that = this;
that.customDialog = that.detailShow; that.customDialog = that.detailShow;
that.tableData = that.tableListData;
} }
}; };
</script> </script>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-06-11 17:29:53 * @Date: 2019-06-11 17:29:53
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-18 10:36:44 * @LastEditTime: 2019-10-22 14:56:51
--> -->
<!-- <!--
备注:由于使用拖拽上传图片,超过限制的图片不上传不显示,暂时修改了源码的的方法,增加了一个判断, 备注:由于使用拖拽上传图片,超过限制的图片不上传不显示,暂时修改了源码的的方法,增加了一个判断,
...@@ -61,6 +61,7 @@ export const postForm = (url, params) => { ...@@ -61,6 +61,7 @@ export const postForm = (url, params) => {
</div> </div>
</template> </template>
<script> <script>
/* eslint-disable */
import { postForm } from '@/api/api'; import { postForm } from '@/api/api';
import tinymce from 'tinymce/tinymce'; import tinymce from 'tinymce/tinymce';
...@@ -77,7 +78,7 @@ import 'tinymce/plugins/wordcount'; ...@@ -77,7 +78,7 @@ import 'tinymce/plugins/wordcount';
import 'tinymce/plugins/colorpicker'; import 'tinymce/plugins/colorpicker';
import 'tinymce/plugins/textcolor'; import 'tinymce/plugins/textcolor';
import 'tinymce/plugins/media'; import 'tinymce/plugins/media';
import 'tinymce/plugins/preview'; // import 'tinymce/plugins/preview';
export default { export default {
name: 'tinymce-edit', name: 'tinymce-edit',
props: { props: {
...@@ -114,8 +115,8 @@ export default { ...@@ -114,8 +115,8 @@ export default {
this.handleImgUpload(blobInfo, success, failure); this.handleImgUpload(blobInfo, success, failure);
}, },
// 添加插件 // 添加插件
plugins: 'preview link image colorpicker textcolor paste media ', // paste media plugins: 'link image colorpicker textcolor paste media ', // paste media preview
toolbar: 'bold italic underline strikethrough | fontsizeselect | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent blockquote | undo redo | link unlink image code media | removeformat | preview', toolbar: 'bold italic underline strikethrough | fontsizeselect | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent blockquote | undo redo | link unlink image code media | removeformat',
branding: false, branding: false,
paste_data_images: true, paste_data_images: true,
paste_image_maxsize: 5, paste_image_maxsize: 5,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-02-25 17:24:09 * @Date: 2019-02-25 17:24:09
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-21 14:12:05 * @LastEditTime: 2019-10-22 12:41:08
--> -->
<template> <template>
<div class="apps-wrap common-set-wrap"> <div class="apps-wrap common-set-wrap">
...@@ -20,7 +20,10 @@ ...@@ -20,7 +20,10 @@
<!-- <i :class="['iconfont', item.appIcon]"></i> --> <!-- <i :class="['iconfont', item.appIcon]"></i> -->
<img :src="item.appIcon" alt="" :class="[item.status == 1 ? '' : 'filter-grayscale']" /> <img :src="item.appIcon" alt="" :class="[item.status == 1 ? '' : 'filter-grayscale']" />
</span> </span>
<span class="color-303133 font-16 p-l-8" @click.self="toAppDetail(item)">{{ item.appName }}</span> <div class="color-303133 font-16 p-l-8" @click.stop="toAppDetail(item)">
<div>{{ item.appName }}</div>
<div v-if="!item.appUrl" class="font-12 color-909399 m-t-5">里面什么也没有~</div>
</div>
<div class="cell-arrow-down"> <div class="cell-arrow-down">
<el-dropdown class="app-cell-dropdown" trigger="hover"> <el-dropdown class="app-cell-dropdown" trigger="hover">
<span class="el-dropdown-link"><i class="el-icon-more el-icon--right color-909399" style="cursor: pointer;"></i> </span> <span class="el-dropdown-link"><i class="el-icon-more el-icon--right color-909399" style="cursor: pointer;"></i> </span>
...@@ -32,7 +35,7 @@ ...@@ -32,7 +35,7 @@
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
<div v-if="item.appUrl" class="app-detail-txt font-12 color-1890ff"><span>详情</span><i class="el-icon-arrow-right"></i></div> <!-- <div v-if="item.appUrl" class="app-detail-txt font-12 color-1890ff"><span>详情</span><i class="el-icon-arrow-right"></i></div> -->
</li> </li>
</ul> </ul>
</div> </div>
...@@ -230,6 +233,10 @@ export default { ...@@ -230,6 +233,10 @@ export default {
line-height: 18px; line-height: 18px;
} }
.m-t-5 {
margin-top: 5px;
}
.tooltip-text { .tooltip-text {
width: 100%; width: 100%;
white-space: pre-wrap; white-space: pre-wrap;
......
...@@ -4,17 +4,40 @@ ...@@ -4,17 +4,40 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-04-12 17:56:45 * @Date: 2019-04-12 17:56:45
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-04-12 17:56:45 * @LastEditTime: 2019-10-23 18:00:10
--> -->
<template> <template>
<div class="notice-list-wrap"> <div class="notice-list-wrap">
<div class="notice-list"> <div class="notice-list">
<common-detail-top :topMenuData="topMenuData" :activeId="activeId"></common-detail-top> <common-detail-top :topMenuData="topMenuData" :activeId="activeId"></common-detail-top>
<el-form :model="ruleFormData" :rules="rules" ref="noteForm" label-width="120px" class="demo-ruleForm"> <el-form :model="ruleFormData" :rules="rules" ref="noteForm" label-width="120px" class="demo-ruleForm">
<el-form-item label="发送范围" class="input-item is-required"> <el-form-item label="发送范围" class="input-item is-required" prop="">
<div class="flex-column item-cell-select inline-block"> <div class="flex">
<el-checkbox v-model="ruleFormData.adminCheck">行政架构</el-checkbox>
<div v-if="ruleFormData.adminCheck" class="flex-column item-cell-select inline-block m-l-10">
<div class="depart-item-wrap"> <div class="depart-item-wrap">
<div style="width:560px" class="el-select el-select--large depart-item-content" @click="showDialogLayer('store', defaultStoreList)"> <div style="width:470px" class="el-select el-select--large depart-item-content" @click="showDialogLayer('depart', defaultSelection)">
<span class="font-14 color-c0c4cc p-l-10" v-if="!defaultSelection.length">请选择行政架构</span>
<div class="el-select__tags">
<span>
<template v-for="(item, index) in defaultSelection">
<span class="el-tag el-tag--info el-tag--small" :key="index">
<span class="el-select__tags-text">{{ item.name || item.storeName }}</span
><i class="el-tag__close el-icon-close" @click.stop="delDepart(index)"></i>
</span>
</template>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="flex m-t-20">
<el-checkbox v-model="ruleFormData.stroreCheck">门店架构</el-checkbox>
<div v-if="ruleFormData.stroreCheck" class="flex-column item-cell-select inline-block m-l-10">
<div class="depart-item-wrap">
<div style="width:350px" class="el-select el-select--large depart-item-content" @click="showDialogLayer('store', defaultStoreList)">
<span class="font-14 color-c0c4cc p-l-10" v-if="!defaultStoreList.length">请选择门店架构</span>
<div class="el-select__tags"> <div class="el-select__tags">
<span> <span>
<template v-for="(item, index) in defaultStoreList"> <template v-for="(item, index) in defaultStoreList">
...@@ -28,19 +51,26 @@ ...@@ -28,19 +51,26 @@
</div> </div>
</div> </div>
</div> </div>
<div v-show="defaultStoreBool && defaultStoreList.length < 1" class="el-form-item__error">请选择发送范围</div> <div class="depart-item-wrap" v-if="ruleFormData.stroreCheck">
<el-select :disabled="$route.query.announcementId ? true : false" class="m-l-10" v-model="ruleFormData.receiveType" placeholder="请选择">
<el-option label="仅店长" value="0"></el-option>
<el-option label="门店所有员工" value="1"></el-option>
</el-select>
</div>
</div>
<div v-show="(defaultStoreBool && !ruleFormData.adminCheck && !ruleFormData.stroreCheck) || (defaultStoreBool && ruleFormData.adminCheck && !defaultSelection.length) || (defaultStoreBool && ruleFormData.stroreCheck && (!defaultStoreList.length || ruleFormData.receiveType == ''))" class="el-form-item__error">请选择发送范围</div>
</el-form-item> </el-form-item>
<el-form-item label="选择分类" prop="labelId"> <el-form-item label="选择分类" prop="labelId">
<el-select v-model="ruleFormData.labelId" placeholder="请选择" style="width:560px"> <el-option v-for="item in classifyOptions" :key="item.labelId" :label="item.labelName" :value="item.labelId"> </el-option> </el-select><el-button class="p-l-20" type="text" @click="newClassify">新建分类</el-button> <el-select :disabled="$route.query.announcementId ? true : false" v-model="ruleFormData.labelId" placeholder="请选择" style="width:560px"> <el-option v-for="item in classifyOptions" :key="item.labelId" :label="item.labelName" :value="item.labelId"> </el-option> </el-select><el-button class="p-l-20" type="text" @click="newClassify">新建分类</el-button>
</el-form-item> </el-form-item>
<el-form-item label="发送对象" prop="receiveType"> <!-- <el-form-item label="发送对象" prop="receiveType">
<el-radio-group v-model="ruleFormData.receiveType"> <el-radio-group v-model="ruleFormData.receiveType">
<el-radio label="0">仅店长</el-radio> <el-radio label="0">仅店长</el-radio>
<el-radio label="1">所有人</el-radio> <el-radio label="1">所有人</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item> -->
<el-form-item label="公告标题" prop="title" class="input-item"> <el-form-item label="公告标题" prop="title" class="input-item">
<limitInput :inputWidth="560" :inputValue.sync="ruleFormData.title" :holder="'请输入公告标题'" :maxLength="15"> </limitInput> <limitInput :disflag="$route.query.announcementId ? true : false" :inputWidth="560" :inputValue.sync="ruleFormData.title" :holder="'请输入公告标题'" :maxLength="15"> </limitInput>
</el-form-item> </el-form-item>
<el-form-item label="封面图片"> <el-form-item label="封面图片">
<el-upload class="upload-demo" :action="uploadUrl()" :show-file-list="false" :before-upload="beforeAvatarUpload" :on-success="handleAvatarSuccess"> <el-upload class="upload-demo" :action="uploadUrl()" :show-file-list="false" :before-upload="beforeAvatarUpload" :on-success="handleAvatarSuccess">
...@@ -54,7 +84,7 @@ ...@@ -54,7 +84,7 @@
<tinymce-edit ref="tinymceWrap" :bodyHtml="ruleFormData.content" :projectName="projectName"></tinymce-edit> <tinymce-edit ref="tinymceWrap" :bodyHtml="ruleFormData.content" :projectName="projectName"></tinymce-edit>
</el-form-item> </el-form-item>
<el-form-item label="发送方式" prop="sendType"> <el-form-item label="发送方式" prop="sendType">
<el-radio-group @change="changeSendType" v-model="ruleFormData.sendType"> <el-radio-group :disabled="$route.query.announcementId ? true : false" @change="changeSendType" v-model="ruleFormData.sendType">
<el-radio label="0">立即发送</el-radio> <el-radio label="0">立即发送</el-radio>
<el-radio label="1">定时发送</el-radio> <el-radio label="1">定时发送</el-radio>
</el-radio-group> </el-radio-group>
...@@ -63,36 +93,42 @@ ...@@ -63,36 +93,42 @@
</el-form-item> </el-form-item>
<el-form-item label="附件" prop="attachment" class="w-680"> <el-form-item label="附件" prop="attachment" class="w-680">
<el-upload class="upload-demo notice-upload-file" action="/haoban-manage-web/upload-file?fileType=report" :before-upload="beforeFileUpload" :on-success="handleFileSuccess" :on-change="handleFileChange" :on-remove="handleRemove" multiple :limit="3" :on-exceed="handleExceed" :file-list="fileDatas"> <el-upload class="upload-demo notice-upload-file" action="/haoban-manage-web/upload-file?fileType=report" :before-upload="beforeFileUpload" :on-success="handleFileSuccess" :on-change="handleFileChange" :on-remove="handleRemove" multiple :limit="3" :on-exceed="handleExceed" :file-list="fileDatas">
<el-button size="small" type="primary">点击上传</el-button> <el-button :disabled="$route.query.announcementId ? true : false" size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">支持.doc,.docx,.pdf,.xls,.xlsx,.ppt,.pptx类型文件,单个附件大小不超过5M,最多添加3个附件</div> <div slot="tip" class="el-upload__tip">支持.doc,.docx,.pdf,.xls,.xlsx,.ppt,.pptx类型文件,单个附件大小不超过5M,最多添加3个附件</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="是否置顶" prop="pageTop"> <el-form-item label="更多设置" prop="pageTop">
<el-radio-group v-model="ruleFormData.pageTop"> <!-- <el-radio-group v-model="ruleFormData.pageTop">
<el-radio label="1">是</el-radio> <el-radio label="1">是</el-radio>
<el-radio label="0">否</el-radio> <el-radio label="0">否</el-radio>
</el-radio-group> </el-radio-group> -->
<el-checkbox :disabled="$route.query.announcementId ? true : false" v-model="ruleFormData.pageTop">置顶公告</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div class="btn-wrap"> <div class="btn-wrap">
<el-button @click="cancelSend" plain>取消</el-button> <el-button @click="cancelSend" plain>取消</el-button>
<el-button @click="sendData('noteForm')" type="primary">发布</el-button> <el-button :disabled="(!defaultStoreBool && !ruleFormData.adminCheck && !ruleFormData.stroreCheck) || (!defaultStoreBool && ruleFormData.adminCheck && !defaultSelection.length) || (!defaultStoreBool && ruleFormData.stroreCheck && (!defaultStoreList.length || ruleFormData.receiveType == '')) || !ruleFormData.title || !ruleFormData.content || (ruleFormData.sendType == '1' && !dateValue) ? true : false" @click="previewData('noteForm')" type="primary">预览</el-button>
<el-button :disabled="$route.query.announcementId ? true : false" @click="sendData('noteForm')" type="primary">发布</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<create-classify :classifyName="classifyName" :showDialog="showDialog" @hideDialog="hideDialog"> </create-classify> <create-classify :classifyName="classifyName" :showDialog="showDialog" @hideDialog="hideDialog"> </create-classify>
<vue-select-employee :appScene="appScene" :defaultSelection="defaultSelection" :onlyPerson="onlyPerson" :treeSet="treeSet" :changed="changed" @handleSelectedList="handleSelectedList"> </vue-select-employee>
<!-- 发送范围的门店选择 --> <!-- 发送范围的门店选择 -->
<vue-select-store ref="storeSelector" :currentBrand="activeGroup" :appScene="appScene" :treeSet="storeTreeSet" :selectType="'group-store'" :defaultList="defaultStoreList" @handleSelectedList="handleSelectedList"> </vue-select-store> <vue-select-store ref="storeSelector" :currentBrand="activeGroup" :appScene="appScene" :treeSet="storeTreeSet" :selectType="'group-store'" :defaultList="defaultStoreList" @handleSelectedList="handleSelectedList"> </vue-select-store>
<notice-preview ref="noticePreview" :noticePreviewData="noticePreviewData" v-model="previewVisible"></notice-preview>
</div> </div>
</template> </template>
<script> <script>
import commonDetailTop from '@/components/app/common-detail-top.vue'; import commonDetailTop from '@/components/app/common-detail-top.vue';
import limitInput from '@/components/limit-input.vue'; import limitInput from '@/components/limit-input.vue';
import vueSelectStore from 'components/common/vueSelectStore'; import vueSelectStore from 'components/common/vueSelectStore';
import vueSelectEmployee from '@/components/common/vueSelectEmployee.vue';
import limitTextarea from '@/components/limit-textarea.vue'; import limitTextarea from '@/components/limit-textarea.vue';
import tinymceEdit from 'components/tinymce-edit'; import tinymceEdit from 'components/tinymce-edit';
import createClassify from '@/components/app/create-classify.vue'; import createClassify from '@/components/app/create-classify.vue';
import noticePreview from '@/components/app/notice-preview.vue';
import { getRequest, postRequest } from '@/api/api'; import { getRequest, postRequest } from '@/api/api';
import showMsg from '@/common/js/showmsg'; import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error'; import errMsg from '@/common/js/error';
...@@ -123,7 +159,7 @@ export default { ...@@ -123,7 +159,7 @@ export default {
}, },
{ {
id: '2', id: '2',
name: '新建公告', name: this.$route.query.announcementId ? '查看公告' : '新建公告',
path: '' path: ''
} }
], ],
...@@ -134,6 +170,11 @@ export default { ...@@ -134,6 +170,11 @@ export default {
enterpriseId: JSON.parse(localStorage.getItem('userInfo')).enterpriseId, enterpriseId: JSON.parse(localStorage.getItem('userInfo')).enterpriseId,
userId: JSON.parse(localStorage.getItem('userInfo')).userId, userId: JSON.parse(localStorage.getItem('userInfo')).userId,
ruleFormData: { ruleFormData: {
announcementId: '',
adminCheck: false,
stroreCheck: false,
adminStructor: [],
storeStructor: [],
receiveType: '0', receiveType: '0',
labelId: '', labelId: '',
title: '', title: '',
...@@ -141,10 +182,10 @@ export default { ...@@ -141,10 +182,10 @@ export default {
content: '', content: '',
sendType: '0', sendType: '0',
attachment: [], attachment: [],
pageTop: '0' pageTop: false
}, },
rules: { rules: {
receiveType: [{ required: true, message: '请选择发送对象', trigger: 'change' }], // receiveType: [{ required: true, message: '请选择发送对象', trigger: 'change' }],
// img: [{ required: true, message: '请上传封面图片', trigger: 'blur' }], // img: [{ required: true, message: '请上传封面图片', trigger: 'blur' }],
title: [{ required: true, message: '请输入公告标题', trigger: 'blur' }], title: [{ required: true, message: '请输入公告标题', trigger: 'blur' }],
content: [{ required: true, message: '请输入公告内容', trigger: 'blur' }], content: [{ required: true, message: '请输入公告内容', trigger: 'blur' }],
...@@ -154,6 +195,17 @@ export default { ...@@ -154,6 +195,17 @@ export default {
actionUrl: '/haoban-manage-web/upload-img', actionUrl: '/haoban-manage-web/upload-img',
datePickerBool: false, datePickerBool: false,
dateValue: '', dateValue: '',
// 行政
selectType: '',
treeSet: {
isSelectPerson: false, // 控制只能选部门(false)
dialogVisible: false, // 控制显示/隐藏
isSingle: false, // 是否单选
openNextBool: true // 展开下级不调用接口
},
defaultSelection: [],
changed: '',
onlyPerson: false, // 控制只能选人(true)
// 门店选择 // 门店选择
appScene: 2, appScene: 2,
defaultStoreList: [], // 默认的数据 defaultStoreList: [], // 默认的数据
...@@ -168,12 +220,48 @@ export default { ...@@ -168,12 +220,48 @@ export default {
fileDatas: [], fileDatas: [],
// 分类 // 分类
classifyName: '', classifyName: '',
showDialog: false showDialog: false,
// 预览
noticePreviewData: {},
previewVisible: false
}; };
}, },
methods: { methods: {
/** /**
* 预览
*/
previewData(formName) {
const that = this;
// 发送范围
if (!that.ruleFormData.adminCheck && !that.ruleFormData.stroreCheck) {
that.defaultStoreBool = true;
that.saveDataBool = false;
}
if (that.ruleFormData.adminCheck && !that.ruleFormData.adminStructor.length) {
that.defaultStoreBool = true;
that.saveDataBool = false;
}
if (that.ruleFormData.stroreCheck && !that.ruleFormData.storeStructor.length) {
that.defaultStoreBool = true;
that.saveDataBool = false;
}
// 发送方式
if (that.ruleFormData.sendType == '1' && !that.dateValue) {
that.datePickerBool = true;
that.saveDataBool = false;
}
if (that.$refs.tinymceWrap.tinymceHtml != '') {
that.ruleFormData.content = that.$refs.tinymceWrap.tinymceHtml;
}
that.$refs[formName].validate(valid => {
if (valid) {
that.noticePreviewData = that.ruleFormData;
that.previewVisible = true;
}
});
},
/**
* 新建分类 * 新建分类
*/ */
newClassify() { newClassify() {
...@@ -349,25 +437,41 @@ export default { ...@@ -349,25 +437,41 @@ export default {
// 门店弹窗显示 // 门店弹窗显示
showDialogLayer(type, selData) { showDialogLayer(type, selData) {
const that = this; const that = this;
that.selectType = type;
that.changed = type;
if (type === 'store') {
that.defaultStoreList = selData; that.defaultStoreList = selData;
that.storeTreeSet = { that.storeTreeSet = {
dialogVisible: true, dialogVisible: true,
isSingle: false, isSingle: false,
isSelectPerson: false isSelectPerson: true,
openNextBool: true // 展开下级不调用接口
};
return;
}
that.treeSet = {
dialogVisible: true,
isSingle: false,
isSelectPerson: true,
openNextBool: true // 展开下级不调用接口
}; };
that.defaultSelection = selData;
}, },
/** /**
* 处理已选部门 * 处理已选部门
*/ */
handleSelectedList(group) { handleSelectedList(group) {
// type: 1:员工,2:部门,3:门店; // type: 1:员工,2:部门,3:门店;
this.defaultStoreList = group; const that = this;
this.ruleFormData.sendArea = group; console.log(group);
if (group.length < 1) { if (that.selectType === 'store') {
this.defaultStoreBool = true; that.ruleFormData.storeStructor = group;
} else { that.defaultStoreList = group;
this.saveDataBool = true; }else {
that.ruleFormData.adminStructor = group;
that.defaultSelection = group;
} }
that.ruleFormData.sendArea = group;
}, },
/** /**
* 删除选的部门 * 删除选的部门
...@@ -375,11 +479,6 @@ export default { ...@@ -375,11 +479,6 @@ export default {
delDepart(index) { delDepart(index) {
let that = this; let that = this;
that.defaultStoreList.splice(index, 1); that.defaultStoreList.splice(index, 1);
if (that.defaultStoreList.length < 1) {
that.defaultStoreBool = true;
} else {
that.saveDataBool = true;
}
}, },
// 选择定时发送的日期 // 选择定时发送的日期
changeMyDate() { changeMyDate() {
...@@ -397,35 +496,36 @@ export default { ...@@ -397,35 +496,36 @@ export default {
}, },
// 发布 // 发布
sendData(formName) { sendData(formName) {
let that = this; const that = this;
let groupIds = []; // 发送范围
let storeIds = []; if (!that.ruleFormData.adminCheck && !that.ruleFormData.stroreCheck ) {
that.defaultStoreList.forEach(ele => { that.defaultStoreBool = true;
if (ele.type == 2) { that.saveDataBool = false;
groupIds.push(ele.groupId);
} }
if (ele.type == 3) { if (that.ruleFormData.adminCheck && !that.ruleFormData.adminStructor.length ) {
storeIds.push(ele.storeId); that.defaultStoreBool = true;
that.saveDataBool = false;
} }
}); if (that.ruleFormData.stroreCheck && !that.ruleFormData.storeStructor.length ) {
// 发送范围 that.defaultStoreBool = true;
if (that.defaultStoreList.length < 1) { that.saveDataBool = false;
this.defaultStoreBool = true;
this.saveDataBool = false;
} }
// 发送方式 // 发送方式
if (that.ruleFormData.sendType == '1' && !this.dateValue) { if (that.ruleFormData.sendType == '1' && !that.dateValue) {
this.datePickerBool = true; that.datePickerBool = true;
this.saveDataBool = false; that.saveDataBool = false;
} }
if (that.$refs.tinymceWrap.tinymceHtml != '') { if (that.$refs.tinymceWrap.tinymceHtml != '') {
that.ruleFormData.content = that.$refs.tinymceWrap.tinymceHtml; that.ruleFormData.content = that.$refs.tinymceWrap.tinymceHtml;
} }
that.ruleFormData.pageTop = that.ruleFormData.pageTop ? 1 : 0;
that.$refs[formName].validate(valid => { that.$refs[formName].validate(valid => {
if (valid) { if (valid) {
let para = { let para = {
groupIds: groupIds.join(','), adminCheck: that.ruleFormData.adminCheck,
storeIds: storeIds.join(','), stroreCheck: that.ruleFormData.stroreCheck,
adminStructor: JSON.stringify(that.ruleFormData.adminStructor),
storeStructor: JSON.stringify(that.ruleFormData.storeStructor),
receiveType: that.ruleFormData.receiveType, receiveType: that.ruleFormData.receiveType,
labelId: that.ruleFormData.labelId || '', labelId: that.ruleFormData.labelId || '',
title: that.ruleFormData.title, title: that.ruleFormData.title,
...@@ -439,7 +539,7 @@ export default { ...@@ -439,7 +539,7 @@ export default {
pageTop: that.ruleFormData.pageTop, pageTop: that.ruleFormData.pageTop,
attachment: that.fileDatas.length? JSON.stringify(that.fileDatas.map(item => item.response.result)): '' attachment: that.fileDatas.length? JSON.stringify(that.fileDatas.map(item => item.response.result)): ''
}; };
if (this.saveDataBool) { if (that.saveDataBool) {
postRequest('/haoban-app-announcement-web/announcement-add', para).then(res => { postRequest('/haoban-app-announcement-web/announcement-add', para).then(res => {
let data = res.data; let data = res.data;
if (data.errorCode == 1) { if (data.errorCode == 1) {
...@@ -477,6 +577,29 @@ export default { ...@@ -477,6 +577,29 @@ export default {
}); });
}); });
}, },
/**
* 获取公告详情
*/
getNoticeData() {
const that = this;
let para = {
announcementId: that.$route.query.announcementId
};
getRequest('/haoban-app-announcement-web/get-announcement-detail', para)
.then(res => {
let data = res.data;
if (data.errorCode == 1) {
that.noticePreviewData = JSON.parse(JSON.stringify(data.result));
that.ruleFormData = JSON.parse(JSON.stringify(data.result));
}
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
}, },
watch: { watch: {
brandId: function(newData, oldData) { brandId: function(newData, oldData) {
...@@ -498,8 +621,10 @@ export default { ...@@ -498,8 +621,10 @@ export default {
limitInput, limitInput,
limitTextarea, limitTextarea,
vueSelectStore, vueSelectStore,
vueSelectEmployee,
tinymceEdit, tinymceEdit,
createClassify createClassify,
noticePreview
}, },
mounted() { mounted() {
const that = this; const that = this;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-04-12 17:56:45 * @Date: 2019-04-12 17:56:45
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-21 15:16:56 * @LastEditTime: 2019-10-22 17:57:14
--> -->
<template> <template>
<div class="notice-list-wrap"> <div class="notice-list-wrap">
...@@ -699,6 +699,7 @@ export default { ...@@ -699,6 +699,7 @@ export default {
// 查看 // 查看
handleShow(id) { handleShow(id) {
const that = this; const that = this;
that.$router.push(`/addNotice?announcementId=${id}&appIcon=${this.$route.query.appIcon}`);
}, },
// 新建公告 // 新建公告
addNotice() { addNotice() {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-03-20 14:36:37 * @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-09-25 17:04:24 * @LastEditTime: 2019-10-23 15:00:51
--> -->
<template> <template>
<div class="my-customer-wrap common-set-wrap"> <div class="my-customer-wrap common-set-wrap">
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class="daily-set-content boder-box"> <div class="daily-set-content boder-box">
<div class="table-condition flex flex-space-between m-b-23"> <div class="table-condition flex flex-space-between m-b-23">
<div class="table-condition-left"> <div class="table-condition-left">
<el-select v-model="conditionObj.completed" placeholder="请选择" class="w-105" @change="changeSelect"> <el-option v-for="item in completedOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select><el-select v-model="conditionObj.overdue" placeholder="请选择" class="w-105 m-l-10" @change="changeSelect"> <el-option v-for="item in overOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select <el-select v-model="conditionObj.completed" placeholder="请选择" class="w-135" @change="changeSelect"> <el-option v-for="item in completedOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select><el-select v-model="conditionObj.overdue" placeholder="请选择" class="w-135 m-l-10" @change="changeSelect"> <el-option v-for="item in overOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select
><el-select v-model="conditionObj.taskType" placeholder="请选择" class="w-105 m-l-10" @change="changeSelect"> ><el-select v-model="conditionObj.taskType" placeholder="请选择" class="w-105 m-l-10" @change="changeSelect">
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option> <el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
</el-select> </el-select>
...@@ -70,7 +70,15 @@ ...@@ -70,7 +70,15 @@
<template slot-scope="scope">{{ scope.row.isOverTime }}</template> <template slot-scope="scope">{{ scope.row.isOverTime }}</template>
</el-table-column> </el-table-column>
<el-table-column label="完成情况"> <el-table-column label="完成情况">
<template slot-scope="scope">{{ scope.row.isCompleted }}</template> <template slot="header" slot-scope="scope">
<el-tooltip class="item" effect="light" placement="right">
<div slot="content">完成情况包含3种<br />1.完成拨打任务;<br />2.完成拨打后放弃任务;<br />3.特殊完成,包含已通知或客人回拨等情况,<br />可通过app端点击&lt;客人未接后回拨&gt;完成任务</div>
<span style="cursor: pointer">完成情况<i class="el-icon-info font-12 color-606266"></i></span>
</el-tooltip>
</template>
<template slot-scope="scope">
{{ scope.row.isCompleted }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="完成时间"> <el-table-column label="完成时间">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -163,21 +171,29 @@ export default { ...@@ -163,21 +171,29 @@ export default {
}, },
completedOptions: [ completedOptions: [
{ {
label: '所有', label: '所有完成情况',
value: '' value: ''
}, },
{ {
label: '已完成', label: '已完成(已拨通)',
value: '1' value: '1'
}, },
{ {
label: '已完成(放弃)',
value: '2'
},
{
label: '已完成(特殊完成)',
value: '3'
},
{
label: '未完成', label: '未完成',
value: '0' value: '0'
} }
], ],
overOptions: [ overOptions: [
{ {
label: '所有', label: '所有逾期情况',
value: '' value: ''
}, },
{ {
...@@ -191,7 +207,7 @@ export default { ...@@ -191,7 +207,7 @@ export default {
], ],
typeOptions: [ typeOptions: [
{ {
label: '所有', label: '所有类型',
value: '' value: ''
}, },
{ {
...@@ -443,6 +459,9 @@ export default { ...@@ -443,6 +459,9 @@ export default {
}; };
</script> </script>
<style type="text/scss" lang="scss" scoped> <style type="text/scss" lang="scss" scoped>
.w-135 {
width: 135px;
}
.task-imgs { .task-imgs {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
......
...@@ -4,15 +4,21 @@ ...@@ -4,15 +4,21 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-03-20 14:36:37 * @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-09-25 17:04:17 * @LastEditTime: 2019-10-23 18:17:34
--> -->
<template> <template>
<div class="daily-set-wrap "> <div class="daily-set-wrap ">
<common-detail-top :topMenuData="topMenuData" :activeId="activeId"></common-detail-top> <!--<common-detail-top :topMenuData="topMenuData" :activeId="activeId"></common-detail-top>-->
<div class="daily-set-content boder-box"> <div class="common-detail-tab">
<el-tabs v-model="conditionObj.tableType" class="daily-set-tab" @tab-click="changeTable">
<el-tab-pane label="门店视图" name="1"></el-tab-pane>
<el-tab-pane label="话务任务视图" name="2"></el-tab-pane>
</el-tabs>
</div>
<div v-if="conditionObj.tableType == 1" class="daily-set-content boder-box">
<div class="table-condition flex flex-space-between m-b-23"> <div class="table-condition flex flex-space-between m-b-23">
<div class="table-condition-left"> <div class="table-condition-left">
<el-input placeholder="请输入门店名称" v-model="conditionObj.searchInput" class="w-264 m-l-10" style="width: 264px;" @keyup.native="value => toInput(value, conditionObj.searchInput)"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input> <el-input placeholder="请输入门店名称" v-model="conditionObj.searchInput" class="w-264" style="width: 264px;" @keyup.native="value => toInput(value, conditionObj.searchInput)"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
<div class="flex-column item-cell-select inline-block m-l-10"> <div class="flex-column item-cell-select inline-block m-l-10">
<div class="depart-item-wrap"> <div class="depart-item-wrap">
<div style="width:213px" class="el-select el-select--large depart-item-content" @click="showDialogLayer('store', conditionObj.storeGroup)"> <div style="width:213px" class="el-select el-select--large depart-item-content" @click="showDialogLayer('store', conditionObj.storeGroup)">
...@@ -40,6 +46,12 @@ ...@@ -40,6 +46,12 @@
<el-button type="primary" @click="exportExcel"><i class="iconfont icon-icon_yunxiazai p-r-6"></i>导出</el-button> <el-button type="primary" @click="exportExcel"><i class="iconfont icon-icon_yunxiazai p-r-6"></i>导出</el-button>
</div> </div>
</div> </div>
<!--<div class="view-classify m-b-20">
<el-radio-group v-model="conditionObj.tableType" @change="changeTable">
<el-radio-button label="1" name="门店视图">门店视图</el-radio-button>
<el-radio-button label="2" name="话务任务视图">话务任务视图</el-radio-button>
</el-radio-group>
</div>-->
<el-table class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }" @selection-change="handleSelectionChange"> <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="35"> </el-table-column> <el-table-column type="selection" width="35"> </el-table-column>
<el-table-column width="25"> <el-table-column width="25">
...@@ -82,6 +94,7 @@ ...@@ -82,6 +94,7 @@
<el-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"> </el-pagination> <el-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"> </el-pagination>
</div> </div>
</div> </div>
<taskView v-if="conditionObj.tableType == 2" :brandId="brandId" :activeGroupId="activeGroupId"></taskView>
<multiple-del :showDialog="showDialog" :detailFlag="false" @hideDialog="hideDialog"> </multiple-del> <multiple-del :showDialog="showDialog" :detailFlag="false" @hideDialog="hideDialog"> </multiple-del>
<vue-select-store ref="storeSelector" :currentBrand="activeGroup" :appScene="appScene" :treeSet="storeTreeSet" :selectType="'group'" :defaultList="defaultStoreList" @handleSelectedList="handleSelectedList"> </vue-select-store> <vue-select-store ref="storeSelector" :currentBrand="activeGroup" :appScene="appScene" :treeSet="storeTreeSet" :selectType="'group'" :defaultList="defaultStoreList" @handleSelectedList="handleSelectedList"> </vue-select-store>
</div> </div>
...@@ -91,6 +104,7 @@ ...@@ -91,6 +104,7 @@
import appDetail from '@/components/app/app-detail.vue'; import appDetail from '@/components/app/app-detail.vue';
import vueSelectStore from 'components/common/vueSelectStore'; import vueSelectStore from 'components/common/vueSelectStore';
import commonDetailTop from '@/components/app/common-detail-top.vue'; import commonDetailTop from '@/components/app/common-detail-top.vue';
import taskView from '@/components/app/taskView.vue';
import multipleDel from '@/components/app/cloudDaily/multiple-del.vue'; import multipleDel from '@/components/app/cloudDaily/multiple-del.vue';
import { getRequest, postRequest, postExcel } from '@/api/api'; import { getRequest, postRequest, postExcel } from '@/api/api';
import { _debounce } from '@/common/js/public'; import { _debounce } from '@/common/js/public';
...@@ -128,6 +142,7 @@ export default { ...@@ -128,6 +142,7 @@ export default {
showDialog: false, showDialog: false,
// 条件 // 条件
conditionObj: { conditionObj: {
tableType: '1',
searchInput: '', searchInput: '',
storeGroup: [], storeGroup: [],
storeType: '', storeType: '',
...@@ -192,6 +207,14 @@ export default { ...@@ -192,6 +207,14 @@ export default {
computed: {}, computed: {},
methods: { methods: {
/** /**
* 改变视图
*/
changeTable(e) {
const that = this;
that.currentPage = 1;
that.getTableList();
},
/**
* 显示选择本页/全部 * 显示选择本页/全部
*/ */
handleCommand(command) { handleCommand(command) {
...@@ -463,7 +486,7 @@ export default { ...@@ -463,7 +486,7 @@ export default {
brandId: that.activeBrand brandId: that.activeBrand
// taskType: 1 //0不良评价,1话务任务 // taskType: 1 //0不良评价,1话务任务
}; };
getRequest('/haoban-app-tel-task-web/task/store-task-list', para) getRequest(that.conditionObj.tableType == 1 ? '/haoban-app-tel-task-web/task/store-task-list' : '/haoban-app-tel-task-web/task/store-task-list-view', para)
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
...@@ -529,7 +552,8 @@ export default { ...@@ -529,7 +552,8 @@ export default {
appDetail, appDetail,
commonDetailTop, commonDetailTop,
vueSelectStore, vueSelectStore,
multipleDel multipleDel,
taskView
} }
}; };
</script> </script>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2018-10-10 14:44:45 * @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2019-10-21 17:54:24 * @LastEditTime: 2019-10-23 14:16:33
--> -->
<template> <template>
<div class="unreview-wrap common-set-wrap"> <div class="unreview-wrap common-set-wrap">
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
<el-button type="primary" @click="sendRefuse('ruleForm')">确 定</el-button> <el-button type="primary" @click="sendRefuse('ruleForm')">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<review-result-detail :detailShow="detailShow" @hideDetailDialog="hideDetailDialog"> </review-result-detail> <review-result-detail :tableListData="tableListData" :detailShow="detailShow" @hideDetailDialog="hideDetailDialog"> </review-result-detail>
<review-result :resultShow="resultShow" @showResultDetail="showResultDetail" @hideResultDialog="hideResultDialog"> </review-result> <review-result :resultShow="resultShow" @showResultDetail="showResultDetail" @hideResultDialog="hideResultDialog"> </review-result>
</div> </div>
</template> </template>
...@@ -238,7 +238,8 @@ export default { ...@@ -238,7 +238,8 @@ export default {
refuseVisible: false, refuseVisible: false,
detailShow: false, detailShow: false,
resultShow: false resultShow: false,
tableListData: [] //审核详情的数据
}; };
}, },
computed: {}, computed: {},
...@@ -258,6 +259,7 @@ export default { ...@@ -258,6 +259,7 @@ export default {
hideResultDialog() { hideResultDialog() {
const that = this; const that = this;
that.resultShow = false; that.resultShow = false;
that.getTableList();
}, },
/** /**
* 显示详情 * 显示详情
...@@ -369,8 +371,17 @@ export default { ...@@ -369,8 +371,17 @@ export default {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
showMsg.showmsg('操作成功', 'success'); showMsg.showmsg('操作成功', 'success');
let resultList = resData.result.list;
that.tableListData = [];
that.tableData.forEach(ele => {
resultList.forEach(key => {
if (key.enterpriseAuditingId == ele.enterpriseAuditingId) {
ele.auditStatus = key.auditStatus == 1 ? '成功' : '失败';
that.tableListData.push(ele);
}
});
});
that.resultShow = true; that.resultShow = true;
that.getTableList();
return; return;
} }
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
......
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