Commit 66135290 by caoyanzhi

Merge branch 'featrue/销售线索' into 'master'

Featrue/销售线索

See merge request !2
parents ade7e0be be2b43ef
......@@ -14,4 +14,13 @@ export default {
}
};
</script>
<style></style>
<style>
@import '../static/font/iconfont.css';
.svg-iconfont {
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
</style>
......@@ -23,7 +23,7 @@ import { Message } from 'element-ui';
Vue.axios.defaults.timeout = 500000;
// let local = window.location.origin;
// eslint-disable-next-line
let local = process.env.NODE_ENV == 'development' ? 'https://www.gicdev.com/': '';
let local = process.env.NODE_ENV == 'development' ? 'https://www.gicdev.com/' : '';
/* if (local.indexOf('localhost') != -1) {
local = 'https://www.gicdev.com';
} */
......@@ -76,9 +76,9 @@ Vue.axios.interceptors.response.use(
window.location.href = local + '/haoban-3/#/login';
}
/* if (data.data.errorCode == 3) {
Message.error({ message: data.data.message });
window.location.href = local + '/haoban-3/#/login';
} */
Message.error({ message: data.data.message });
window.location.href = local + '/haoban-3/#/login';
} */
if (data.data.errorCode == 10 || data.data.errorCode == 7) {
window.location.href = local + '/haoban-3/#/index';
}
......@@ -212,10 +212,10 @@ export const postExcel = (url, params) => {
'content-type': 'application/x-www-form-urlencoded'
} //multipart/form-data{"token": token}
/* httpAgent: new http.Agent({
keepAlive: true
}),
httpsAgent: new https.Agent({
keepAlive: true
}) */
keepAlive: true
}),
httpsAgent: new https.Agent({
keepAlive: true
}) */
});
};
This diff is collapsed. Click to expand it.
......@@ -34,7 +34,7 @@ export default {
dateToTime(val) {
console.log(val)
// console.log(val)
// (0-9)年月数字的显示
function formatDig(num) {
return num > 9 ? '' + num : '0' + num;
......
......@@ -127,7 +127,7 @@
</el-tooltip>
</template>
<template slot-scope="scope">
<el-button type="text" size="small" @click="toEditGroup(scope.$index, scope.row)">编辑分组可见范围</el-button>
<el-button type="text" @click="toEditGroup(scope.$index, scope.row)">编辑分组可见范围</el-button>
</template>
</el-table-column>
</el-table>
......@@ -387,7 +387,7 @@ export default {
});
},
handleSelectedList(data) {
console.log(data);
// console.log(data);
const that = this;
that.defaultStoreList = data || [];
that.saveGorupRange();
......@@ -432,7 +432,7 @@ export default {
*/
toChangeTemp(e, index, row) {
const that = this;
console.log(e, index, row)
// console.log(e, index, row)
let para = {
brandId: that.brandId,
memberTagGroupId: row.memberTagGroupId,
......
......@@ -37,8 +37,8 @@
</el-table-column>
<el-table-column prop="" label="操作" show-overflow-tooltip>
<template slot-scope="scope">
<el-button type="text" size="small" @click="toEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="text" size="small" @click="toDel(scope.$index, scope.row)">删除</el-button>
<el-button type="text" @click="toEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="text" @click="toDel(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -62,8 +62,8 @@
</el-table-column>
<el-table-column prop="" width="200" label="操作" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click="toSendDetail(scope.$index, scope.row, '1')">发送记录</el-button>
<el-button type="text" size="small" @click="toSendDetail(scope.$index, scope.row, '2')">领取记录</el-button>
<el-button type="text" @click="toSendDetail(scope.$index, scope.row, '1')">发送记录</el-button>
<el-button type="text" @click="toSendDetail(scope.$index, scope.row, '2')">领取记录</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -64,7 +64,7 @@ components: {
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="showDetail(scope.$index, scope.row)">查看详情</el-button>
<el-button type="text" @click="showDetail(scope.$index, scope.row)">查看详情</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -106,7 +106,7 @@ export default {
if (status === 'complete' && result.info === 'OK') {
if (result && result.regeocode) {
/* eslint-disable */
console.log(result);
// console.log(result);
that.address = result.regeocode.formattedAddress;
that.ruleForm.address = result.regeocode.formattedAddress;
that.$nextTick();
......
......@@ -96,7 +96,7 @@ components: {
</el-table-column>
<el-table-column prop="" label="操作" show-overflow-tooltip>
<template slot-scope="scope">
<el-button type="text" size="small" @click="toSendDetail(scope.$index, scope.row)">发送记录</el-button>
<el-button type="text" @click="toSendDetail(scope.$index, scope.row)">发送记录</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -201,7 +201,7 @@ export default {
*/
handleSelectedList(group) {
const that = this;
console.log(group);
// console.log(group);
/* if (that.selectType === 'people') {
that.formData.peopleList = group;
} else */
......
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2020-02-08 10:27:21
* @LastEditors: 无尘
* @LastEditTime: 2020-08-26 09:57:29
-->
<!--
选择门店分组组件:
<gic-select-group
:brandId="enterpriseId"
width="287px"
:authMerchant="true"
:selectData="partForm.storeGroup"
@checkGroupIds="checkGroupIds">
</gic-select-group>
import gicSelectGroup from '@/components/common/gic-select-group.vue';
checkGroupIds: function(nodes) {
const that = this;
that.conditionObj.groupIds = nodes;
},
-->
<template>
<el-popover placement="bottom-start" style="min-width: 357px" v-model="departmentVisible">
<div class="select-search authMerchant">
<el-input placeholder="请输入内容" maxlength="50" v-model="searchSelect" style="width: 100%;" @keyup.native="value => toInput(value, searchSelect)" @clear="clearSearch"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
</div>
<div class="select-tree-wrap m-t-10">
<!--:load="loadNode"-->
<el-tree :filter-node-method="filterNode" clearable :data="groupData" :default-checked-keys="checkedKeys" node-key="relationId" ref="groupTree" check-strictly show-checkbox default-expand-all :props="defaultProps" :expand-on-click-node="false" @check="checkGroup">
<div class="custom-tree-node" slot-scope="{ data }">
<p>
<span :class="['font-14 p-r-10 iconfont', 'iconqiye-tianchong', data.isBind == 1 ? 'color-2f54eb' : 'color-dedfe6']"></span><span class="font-14 color-606266">{{ data.label }}</span>
</p>
<p class="color-909399 font-12">{{ data.isBind ? data.wxEnterpriseName + '已授权' : '' }}</p>
</div>
</el-tree>
</div>
<div class="flex-column item-cell-select inline-block " slot="reference">
<div class="depart-item-wrap">
<div :style="{ width: width }" class="el-select el-select--large depart-item-content">
<span class="font-14 color-c0c4cc p-l-10" style="display: inline-block;line-height: 32px;color: #c0c4cc;" v-if="!groupIds.length">请选择门店分组</span>
<div class="el-select__tags" style="max-width: 348px;">
<span style="display:block">
<template v-for="(item, index) in groupIds">
<span class="el-tag el-tag--info el-tag--small" :key="index">
<span class="el-select__tags-text">{{ item.relationName }}</span>
<i class="el-tag__close el-icon-close" @click.stop="delDepart(index, groupIds)"></i>
</span>
</template>
</span>
</div>
</div>
</div>
</div>
</el-popover>
</template>
<script>
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public';
// import dayLoginChartVue from '../login-data/day-login-chart.vue';
export default {
name: 'gic-select-group',
props: {
width: {
type: String,
default() {
return '287px';
}
},
selectData: {
// 数据回显
type: [Object, Array],
default() {
return [];
}
},
brandId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
projectName: '', // 当前项目名
enterpriseId: this.brandId,
searchSelect: '', // 搜索字段
departmentVisible: false,
groupIds: [],
groupData: [],
checkedListCopy: [],
groupDataCopy: [],
defaultProps: {
children: 'children',
label: 'storeGroupName'
},
checkedKeys: []
};
},
methods: {
filterNode(value, data) {
if (!value || !data.label) return true;
return data.label.indexOf(value) !== -1;
},
/**
* 加载更多
*/
async loadNode(node, resolve) {
const that = this;
if (node.level === 0) {
return resolve(that.getGroup());
} else {
await that.getGroup(node, node.data, resolve);
}
},
/**
* 输入
*/
toInput: _debounce(function(e, value) {
const that = this;
// that.getGroup();
if (!that.groupDataCopy.length) {
return false;
}
}, 500),
/**
* 清空
*/
clearSearch() {
const that = this;
that.groupData = JSON.parse(JSON.stringify(that.groupDataCopy));
},
/**
* 删除
*/
delDepart(index, arr) {
const that = this;
arr.splice(index, 1);
const keys = arr.map(ele => ele.relationId);
that.setCheckedKeys(keys);
},
/**
* 选择 tree 节点,获取选择节点信息
*/
checkGroup: function(e) {
const that = this;
that.groupIds = that.$refs.groupTree.getCheckedNodes();
that.$emit('checkGroupIds', that.$refs.groupTree.getCheckedNodes());
},
/**
* 设置 tree
*/
setCheckedKeys(keys) {
const that = this;
that.$refs.groupTree.setCheckedKeys(keys);
that.$emit('checkGroupIds', that.$refs.groupTree.getCheckedNodes());
},
/**
* 处理排序
*/
async handleSort(item) {
const that = this;
for (let i = 0; i < item.children.length; i++) {
item.children.sort(function(a, b) {
return a.storeGroupSort - b.storeGroupSort;
});
if (item.children[i].length) {
await that.handleSort(item.children[i]);
}
}
},
/**
* 简单数组-->父子数组对象
*/
async treeData(data) {
// const that = this;
let tree = data.filter(father => {
father.disabled = father.isBind ? true : false;
//循环所有项
let branchArr = data.filter(child => {
return father.relationId == child.parentRelationId; //返回每一项的子级数组
});
if (branchArr.length > 0) {
father.children = branchArr; //如果存在子级,则给父级添加一个children属性,并赋值
}
return father.parentRelationId == 0; //返回第一层
});
return tree;
},
/**
* 获取门店分组
*/
async getGroup() {
const that = this;
let para = {
enterpriseId: that.brandId
};
getRequest('/haoban-manage3-web/gic-store-group-list', para)
.then(async res => {
let resData = res.data;
if (resData.errorCode == 1) {
if (!!resData.result && !!resData.result.length) {
resData.result.forEach(ele => {
ele.label = ele.relationName;
ele.relationName = ele.relationName;
});
const data = await that.treeData(resData.result);
that.$nextTick(() => {
that.groupData = JSON.parse(JSON.stringify(data)) || [];
that.groupDataCopy = JSON.parse(JSON.stringify(that.groupData)) || [];
if (that.selectData) {
that.checkedListCopy = that.selectData;
}
});
that.$forceUpdate();
}
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
selectData: function(newData, oldData) {
let that = this;
if (!!newData.length) {
that.checkedKeys = newData.map(ele => ele.relationId);
that.groupIds = that.$refs.groupTree.getCheckedNodes();
} else {
that.groupIds = [];
}
},
searchSelect(val) {
this.$refs.groupTree.filter(val);
},
brandId(val) {
const that = this;
that.searchSelect = '';
that.groupIds = [];
that.groupData = [];
that.groupDataCopy = [];
if (val) {
that.getGroup();
}
},
checkedListCopy(val) {
this.$nextTick(() => {
this.groupIds = [];
val.forEach(i => {
const node = this.$refs.groupTree.getNode(i);
this.groupIds.push(node.data);
if (node.isLeaf) {
this.$refs.groupTree.setChecked(node, true);
this.$emit('checkGroupIds', this.$refs.groupTree.getCheckedNodes());
}
});
});
}
},
mounted() {
const that = this;
that.getGroup();
}
};
</script>
<style lang="scss" scoped>
.depart-item-content {
width: 213px;
height: 32px;
overflow: hidden;
white-space: nowrap;
border-radius: 2px;
border: 1px solid #c4c6cf;
cursor: pointer;
box-sizing: border-box;
}
.select-tree-wrap {
max-height: 300px;
overflow-y: auto;
.custom-tree-node {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
width: 100%;
padding-right: 12px;
}
}
.item-cell-select {
>>> .el-select__tags {
white-space: nowrap;
overflow: hidden;
}
.el-select {
.el-tag {
border-radius: 2px;
border: 1px solid rgba(220, 223, 230, 1);
background-color: #fff;
.el-tag__close {
top: 1px;
color: #909399;
&:hover {
background-color: transparent;
}
}
}
}
}
.authMerchant {
width: 253px;
}
</style>
<template>
<svg class="icon svg-icon svg-iconfont" aria-hidden="true" :style="ClassStyle">
<use :xlink:href="IconName"></use>
</svg>
</template>
<script>
export default {
props: {
size: {
type: [Number, String],
default: 20
},
iconname: {
type: String,
default: ''
}
},
computed: {
ClassStyle() {
return `width:${parseInt(this.size)};height:${parseInt(this.size)};`;
},
IconName() {
return `#${this.iconname}`;
}
}
};
</script>
<style scoped></style>
......@@ -218,7 +218,7 @@ export default {
}
/* eslint-disable */
that.fileDatas = fileList;
console.log('fileList:', fileList, that.fileDatas)
// console.log('fileList:', fileList, that.fileDatas)
that.$nextTick(() => {
let list = [];
if (fileList.length) {
......@@ -300,17 +300,17 @@ export default {
width: 104px;
background-color: transparent;
}
.gic-upload__img {
display: inline-block;
}
.gic-upload__img__drag {
max-width: 680px;
display: inline-block;
font-size: 0;
}
.gic-upload__img .img-content {
position: relative;
display: inline-block;
......@@ -323,11 +323,11 @@ export default {
border-radius: 4px;
cursor: pointer;
}
.img-content.m-t-8 {
margin-top: 8px;
}
.gic-upload__img .img-content .upload-icon__btn {
position: absolute;
font-size: 16px;
......@@ -336,7 +336,7 @@ export default {
left: 50%;
transform: translate(-50%, -50%);
}
.gic-upload__img .img-content .item-img {
display: flex;
align-items: center;
......@@ -350,14 +350,14 @@ export default {
/*border: 1px solid #dcdfe6;*/
border-radius: 0;
}
.gic-upload__img .img-content .item-img img {
position: static;
display: block;
max-width: 86px;
max-height: 86px;
}
.gic-upload__img .img-content::after {
position: absolute;
top: 8px;
......@@ -371,47 +371,47 @@ export default {
transition: all 0.3s;
opacity: 0;
}
.gic-upload__img .img-content:hover::after {
opacity: 1;
}
.gic-upload__img .img-content:hover .upload-icon__btn {
display: block;
z-index: 100;
color: #fff;
}
.gic-upload__img .img-upload {
display: inline-block;
vertical-align: middle;
font-size: 28px;
}
.img-upload.m-t-8 {
margin-top: 8px;
}
.el-upload-list--picture-card {
display: none;
}
.el-upload--picture-card {
width: 104px;
height: 104px;
line-height: 104px;
}
.slide-fade-enter-active {
transition: all 0.6s ease;
}
.slide-fade-leave-active {
transition: all 0.6s cubic-bezier(0.55, 0, 0.1, 1);
}
.slide-fade-enter,
.slide-fade-leave-to {
opacity: 0;
}
</style>
\ No newline at end of file
</style>
<!--
* @Descripttion: 销售线索-门店任务-任务详情-完成详细信息
* @version: 1.0.0
* @Author: 阿羽
* @Date: 2021-04-13 17:57:01
* @LastEditors: 阿羽
* @LastEditTime: 2021-04-13 17:57:01
-->
<!--
<salesleads-taskinfo :item="item"></salesleads-taskinfo>
import salesleadsTaskinfo from '@/components/review/salesleads-task-info.vue';
-->
<template>
<el-dialog title="完成详情" :visible.sync="dialogVisible" width="600px" @close="close">
<div class="">
<el-form :model="form" :rules="rules" ref="form" label-width="120px" class="demo-form">
<el-form-item label="完成时间" prop="overdueTime"> {{ form.finishTime | formatTimeStamp }}</el-form-item>
<el-form-item label="完成方式" prop="touchTypes"> {{ form.touchFinishTypeName }}</el-form-item>
<el-form-item label="备注" prop="finishRemark"> {{ form.finishRemark || '' }} </el-form-item>
<el-form-item label="图片" prop="imgUrl">
<template v-for="item in form.remarkImgUrl">
<el-popover placement="right-start" :open-delay="200" width="300" trigger="hover" :key="item">
<img style="display:block;width:100%" :src="item" alt="" />
<el-image slot="reference" style="width: 40px; height: 40px" :src="item" fit="cover"></el-image>
</el-popover>
</template>
</el-form-item>
</el-form>
</div>
</el-dialog>
</template>
<script>
export default {
props: {
item: {
type: Object,
default() {
return {};
}
}
},
components: {},
data() {
return {
dialogVisible: true,
form: {
finishTime: null,
finishRemark: '',
touchFinishTypeName: '',
remarkImgUrl: []
}
};
},
methods: {
close() {
this.$emit('close');
}
},
watch: {
item(newData) {
const that = this;
if (Object.keys(newData).length) {
that.$nextTick(() => {
that.form = JSON.parse(JSON.stringify(newData));
});
}
}
},
mounted() {
const that = this;
if (Object.keys(that.item).length) {
that.$nextTick(() => {
that.form = JSON.parse(JSON.stringify(that.item));
});
}
}
};
</script>
<style lang="scss" scoped>
>>> .el-dialog__header {
padding: 19px 28px;
}
>>> .el-dialog__body {
padding-top: 10px;
}
>>> .el-form-item {
margin-bottom: 0;
.el-form-item__label {
line-height: 30px;
}
.el-form-item__content {
font-size: 14px;
font-weight: 400;
color: #303133;
line-height: 30px;
}
.el-popover__reference {
margin-top: 10px;
margin-right: 10px;
border-radius: 4px;
}
}
</style>
<!--
* @Descripttion:企业信息-新增小程序
* @version: 1.0.0
* @Author: 阿羽
* @Date: 2021-04-12 15:57:24
* @LastEditors: 阿羽
* @LastEditTime: 2021-04-12 15:57:24
-->
<!--
<app-set @closeText="closeText" @submitText="submitText"></app-set>
import appSet from '@/components/set/app-set.vue';
-->
<template>
<el-dialog :title="editRow.type === 'edit' ? '编辑' : '获取小程序'" :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
<div class="">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
<el-form-item label="授权商户" prop="enterpriseId">
<el-select v-model="ruleForm.enterpriseId" placeholder="请选择授权商户" :disabled="editRow.type === 'edit'" @change="chooseEnterprise">
<el-option v-for="item in options" :key="item.value" :label="item.enterpriseName" :value="item.enterpriseId"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="小程序名称" prop="miniprogramName">
<el-input show-word-limit placeholder="请输入小程序名称" type="text" v-model="ruleForm.miniprogramName" maxlength="20"></el-input>
</el-form-item>
<el-form-item label="AppID:" prop="appId">
<el-input show-word-limit placeholder="请先选择授权商户" type="text" v-model="ruleForm.appId" maxlength="80" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="标题:" prop="title">
<el-input show-word-limit placeholder="请输入标题" type="text" v-model="ruleForm.title" maxlength="80"></el-input>
</el-form-item>
<el-form-item label=" 封面:" prop="pic">
<single-upload uploadType="1" :imgSrc.sync="ruleForm.imageUrl" :field="''" class="app-set" :uploadLimit="20"> </single-upload>
<p style="margin-top: 9px;font-size: 12px;color: #909399;line-height: 17px;">建议尺寸520*416,支持png、jpg、jpeg格式</p>
</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')">{{ editRow.type === 'edit' ? '保存' : '确定' }}</el-button>
</div>
</el-dialog>
</template>
<script>
import singleUpload from '@/components/single-upload.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';
export default {
props: {
editRow: {
type: Object,
default() {
return {};
}
}
},
components: {
singleUpload
},
data() {
return {
dialogVisible: true,
ruleForm: {
miniprogramName: '',
appId: '',
title: '',
imageUrl: ''
},
rules: {
enterpriseId: [{ required: true, message: '请选择授权商户', trigger: 'blur' }],
miniprogramName: [{ required: true, message: '请输入小程序名称', trigger: 'blur' }],
appId: [{ required: true, message: '请输入AppID', trigger: 'blur' }],
title: [{ required: true, message: '请输入标题', trigger: 'blur' }]
},
options: []
};
},
methods: {
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) {
this.$confirm('是否确认提交?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
that.postSave();
})
.catch(() => {});
}
});
}, 300),
postSave() {
const that = this;
const data = { ...that.ruleForm };
postRequest('/haoban-manage3-web/save-miniprogram-setting', data)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('操作成功', 'success');
that.$refs['ruleForm'].resetFields();
that.$emit('submitText');
} else {
that.$refs['ruleForm'].resetFields();
that.$emit('submitText');
errMsg.errorMsg(resData);
}
})
.catch(error => {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
getTableList(val) {
const that = this;
let para = {};
getRequest('/haoban-manage3-web/wxa-enterprise-list', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.options = resData.result || [];
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
chooseEnterprise(val) {
const that = this;
const item = that.options.filter(item => item.enterpriseId === val)[0];
that.ruleForm.miniprogramName = item.miniprogramName;
that.ruleForm.appId = item.appId;
that.ruleForm.title = item.title;
that.ruleForm.imageUrl = item.imageUrl;
}
},
watch: {
editRow(newData) {
const that = this;
if (Object.keys(newData).length) {
that.$nextTick(() => {
that.ruleForm = JSON.parse(JSON.stringify(newData));
});
}
}
},
mounted() {
const that = this;
that.getTableList();
if (Object.keys(that.editRow).length) {
that.$nextTick(() => {
that.ruleForm = JSON.parse(JSON.stringify(that.editRow));
});
}
}
};
</script>
<style lang="scss" scoped></style>
<style lang="scss">
.app-set {
.avatar-uploader {
.el-upload {
width: 60px !important;
height: 60px !important;
.font-12 {
display: none;
}
.avatar-uploader-icon {
font-size: 14px;
color: #303133;
font-weight: bold;
}
}
}
.upload-tip {
display: none;
}
}
</style>
<!--
* @Descripttion:素材库-分配企业
* @version: 1.0.0
* @Author: 阿羽
* @Date: 2021-04-12 15:57:24
* @LastEditors: 阿羽
* @LastEditTime: 2021-04-12 15:57:24
-->
<!--
<el-button type="text" @click="toDistribute(scope.$index, scope.row)" v-if="scope.row.fromMaterialId =='-1'">分配企业</el-button>
<distribution-enterprise :editRow="distributionEditRow" :show="showDistribution" @closeText="closeTextDistribution" @submitText="submitTextDistribution"></distribution-enterprise>
<script>
import distributionEnterprise from '@/components/set/distribution-enterprise.vue';
export default {
data() {
return {
showDistribution: false,
distributionEditRow: {}
};
},
methods: {
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;
},
},
components: {
distributionEnterprise
}
-->
<template>
<el-dialog title="分配企业" :visible.sync="dialogVisible" width="490px" class="distribution-enterprise" @close="toCancel">
<div>
<el-form :model="form" :rules="rules" ref="ruleForm" class="demo-ruleForm">
<el-form-item>
<p class="check-all">
<el-checkbox v-model="checkAll" :disabled="hasCheckAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">全选</el-checkbox>
</p>
<el-form-item prop="checkedList">
<p v-if="!options.length" class="no-enterprise">暂无可分配企业</p>
<el-checkbox-group v-else v-model="form.checkedList" name="checkedList" @change="handleCheckedListChange">
<el-checkbox v-for="(opt, index) in options" name="checkedList" :label="opt.wxEnterpriseId" :key="index" :disabled="opt.bindFlag">
<p class="name">{{ opt.enterpriseName }}</p>
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</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')" :disabled="hasCheckAll">分配</el-button>
</div>
</el-dialog>
</template>
<script>
import { _debounce } from '@/common/js/public';
import { postRequest, getRequest } from '@/api/api';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
export default {
props: {
editRow: {
type: Object,
default() {
return {};
}
},
show: {
type: Boolean,
default() {
return false;
}
}
},
data() {
return {
dialogVisible: false,
ruleForm: {
enterpriseId: ''
},
rules: {
checkedList: [{ type: 'array', required: true, message: '请选择企业', tigger: 'change' }]
},
hasCheckAll: false,
checkAll: false,
form: { checkedList: [] },
options: [],
isIndeterminate: false
};
},
methods: {
toCancel() {
this.$emit('closeText');
this.form.checkedList = [];
this.hasCheckAll = false;
this.checkAll = false;
this.isIndeterminate = false;
this.$refs['ruleForm'].resetFields();
},
submitForm: _debounce(function(formName) {
const that = this;
that.$refs[formName].validate(valid => {
if (valid) {
this.$confirm('是否确认提交?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
that.postSave();
})
.catch(() => {});
}
});
}, 300),
postSave() {
const that = this;
let data = {
materialIds: that.editRow.materialId,
toWxEnterpriseIds: that.form.checkedList.join(',')
};
postRequest('/haoban-manage3-web/material-share', data)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('操作成功', 'success');
that.$emit('submitText');
} else {
errMsg.errorMsg(resData);
}
})
.catch(error => {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
handleCheckAllChange(val) {
if (val) {
let arr = [];
this.options.map(item => {
arr.push(item.wxEnterpriseId);
});
this.form.checkedList = [...arr];
} else {
this.form.checkedList = [];
}
this.isIndeterminate = false;
},
handleCheckedListChange(value) {
this.form.checkedList = value;
let checkedCount = value.length;
this.checkAll = checkedCount === this.options.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.options.length;
},
getOptions() {
const data = {
materialId: this.editRow.materialId
};
this.checkAll = false;
this.hasCheckAll = false;
getRequest('/haoban-manage3-web/agent-wx-enterprise-list', data)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1 && resData.result && resData.result.length) {
let arr = [];
let options = resData.result.filter(item => {
if (arr.indexOf(item.wxEnterpriseId) === -1) {
if (item.bindFlag) {
this.form.checkedList.push(item.wxEnterpriseId);
}
arr.push(item.wxEnterpriseId);
return item;
}
});
if (this.form.checkedList.length === options.length) {
this.checkAll = true;
this.hasCheckAll = true;
}
this.options = [...options];
this.handleCheckedListChange(this.form.checkedList);
} else {
errMsg.errorMsg(resData);
}
})
.catch(error => {
this.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
show(newV, oldV) {
this.dialogVisible = newV;
},
editRow(newData) {
if (Object.keys(newData).length) {
this.getOptions();
}
}
},
mounted() {
if (Object.keys(this.editRow).length) {
this.getOptions();
}
}
};
</script>
<style lang="scss" scoped>
.distribution-enterprise {
>>> .el-dialog {
height: 429px;
}
>>> .el-dialog__header {
padding: 16px 0 10px 20px;
.el-dialog__title {
display: block;
line-height: 25px;
}
}
>>> .el-dialog__body {
padding: 12px 16px 0 17px;
.check-all {
width: 100%;
height: 40px;
box-sizing: border-box;
background: #f5f7fa;
padding-left: 28px;
margin-bottom: 18px;
}
.el-checkbox-group {
height: 248px;
box-sizing: content-box;
overflow: scroll;
padding-left: 28px;
.el-checkbox {
display: flex;
justify-content: flex-start;
align-items: flex-start;
margin: 0 0 20px;
.name {
font-size: 14px;
color: #303133;
line-height: 14px;
margin-bottom: 6px;
}
}
}
}
>>> .el-dialog__footer {
padding-top: 16px;
padding-bottom: 20px;
}
}
.no-enterprise {
height: 248px;
text-align: center;
color: #606266;
}
</style>
<style lang="scss"></style>
......@@ -45,8 +45,11 @@
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="toEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="text" @click="toDel(scope.$index, scope.row)">删除</el-button>
<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>
......@@ -54,9 +57,11 @@
<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>
<file-edit v-if="textShow" :editRow="editRow" :categoryId="categoryId" @closeText="closeText" @submitText="submitText"></file-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 fileEdit from '@/components/set/file-edit.vue';
import { postRequest } from '@/api/api';
// import { _debounce } from '@/common/js/public';
......@@ -106,7 +111,9 @@ export default {
tableData: [],
multipleSelection: [],
textShow: false,
editRow: {}
editRow: {},
showDistribution: false,
distributionEditRow: {}
};
},
computed: {},
......@@ -128,6 +135,20 @@ export default {
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;
},
/**
* 编辑
*/
......@@ -248,7 +269,8 @@ export default {
}
},
components: {
fileEdit
fileEdit,
distributionEnterprise
}
};
</script>
......
......@@ -45,8 +45,11 @@
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="toEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="text" @click="toDel(scope.$index, scope.row)">删除</el-button>
<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>
......@@ -54,9 +57,11 @@
<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>
<image-edit v-if="textShow" :editRow="editRow" :categoryId="categoryId" @closeText="closeText" @submitText="submitText"></image-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 imageEdit from '@/components/set/image-edit.vue';
import { postRequest } from '@/api/api';
// import { _debounce } from '@/common/js/public';
......@@ -106,7 +111,9 @@ export default {
tableData: [],
multipleSelection: [],
textShow: false,
editRow: {}
editRow: {},
showDistribution: false,
distributionEditRow: {}
};
},
computed: {},
......@@ -125,6 +132,20 @@ export default {
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;
},
/**
* 编辑
*/
......@@ -245,7 +266,8 @@ export default {
}
},
components: {
imageEdit
imageEdit,
distributionEnterprise
}
};
</script>
......
......@@ -19,8 +19,7 @@
</el-form-item>
<el-form-item label="内容" prop="materialContent">
<div class="material-content">
<!-- <textarea class="material-body" placeholder="请输入内容" id="textpanel" v-model="ruleForm.materialContent"></textarea> -->
<limit-textarea class="material-body" :inputWidth="440" :inputValue.sync="ruleForm.materialContent" :holder="'请输入内容'" :getByType="'char'" :maxLength="1000"> </limit-textarea>
<el-input show-word-limit placeholder="请输入内容" type="textarea" v-model="ruleForm.materialContent" maxlength="1000" class="w-440 welcomeContent"></el-input>
<el-popover placement="top" width="388" trigger="click">
<ul class="flex flex-wrap">
<li v-for="(item, index) in emojiList" :key="index + 'emoji'">
......@@ -41,7 +40,6 @@
</template>
<script>
import limitInput from '@/components/limit-input.vue';
import limitTextarea from '@/components/limit-textarea.vue';
import { _debounce } from '@/common/js/public';
import { postRequest } from '@/api/api';
import showMsg from '@/common/js/showmsg';
......@@ -63,8 +61,7 @@ export default {
}
},
components: {
limitInput,
limitTextarea
limitInput
},
data() {
return {
......@@ -95,7 +92,12 @@ export default {
**/
selectEmoji(item) {
const that = this;
that.ruleForm.materialContent = that.ruleForm.materialContent + item.key;
const str = that.ruleForm.materialContent + item.key;
if (str.length > 1000) {
this.$message('添加该表情后文本内容将超过字数限制,无法添加!');
} else {
that.ruleForm.materialContent = str;
}
},
toCancel() {
const that = this;
......@@ -166,6 +168,9 @@ export default {
.p-l-18 {
padding-left: 18px;
}
.w-440 {
width: 440px;
}
.material-content {
position: relative;
.material-body {
......
......@@ -43,8 +43,11 @@
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="toEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="text" @click="toDel(scope.$index, scope.row)">删除</el-button>
<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>
......@@ -52,9 +55,11 @@
<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>
<text-edit v-if="textShow" :editRow="editRow" :categoryId="categoryId" @closeText="closeText" @submitText="submitText"></text-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 textEdit from '@/components/set/text-edit.vue';
import { postRequest } from '@/api/api';
// import { _debounce } from '@/common/js/public';
......@@ -104,7 +109,9 @@ export default {
tableData: [],
multipleSelection: [],
textShow: false,
editRow: {}
editRow: {},
showDistribution: false,
distributionEditRow: {}
};
},
computed: {},
......@@ -123,6 +130,23 @@ export default {
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;
},
/**
* 编辑
*/
......@@ -243,7 +267,8 @@ export default {
}
},
components: {
textEdit
textEdit,
distributionEnterprise
}
};
</script>
......@@ -262,9 +287,6 @@ export default {
vertical-align: middle;
line-height: 32px;
}
.table-condition {
// min-width: 1200px;
}
.daily-set-wrap {
height: 100%;
.daily-set-content {
......
......@@ -47,8 +47,11 @@
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="toEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="text" @click="toDel(scope.$index, scope.row)">删除</el-button>
<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>
......@@ -56,9 +59,11 @@
<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>
<video-edit v-if="textShow" :editRow="editRow" :categoryId="categoryId" @closeText="closeText" @submitText="submitText"></video-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 videoEdit from '@/components/set/video-edit.vue';
import { postRequest } from '@/api/api';
// import { _debounce } from '@/common/js/public';
......@@ -108,7 +113,9 @@ export default {
tableData: [],
multipleSelection: [],
textShow: false,
editRow: {}
editRow: {},
showDistribution: false,
distributionEditRow: {}
};
},
computed: {},
......@@ -130,6 +137,20 @@ export default {
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;
},
/**
* 编辑
*/
......@@ -250,7 +271,8 @@ export default {
}
},
components: {
videoEdit
videoEdit,
distributionEnterprise
}
};
</script>
......
......@@ -48,8 +48,11 @@
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="toEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="text" @click="toDel(scope.$index, scope.row)">删除</el-button>
<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>
......@@ -57,9 +60,11 @@
<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>
<web-edit v-if="textShow" :editRow="editRow" :categoryId="categoryId" @closeText="closeText" @submitText="submitText"></web-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 webEdit from '@/components/set/web-edit.vue';
import { postRequest } from '@/api/api';
// import { _debounce } from '@/common/js/public';
......@@ -109,7 +114,9 @@ export default {
tableData: [],
multipleSelection: [],
textShow: false,
editRow: {}
editRow: {},
showDistribution: false,
distributionEditRow: {}
};
},
computed: {},
......@@ -128,6 +135,20 @@ export default {
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;
},
/**
* 编辑
*/
......@@ -248,7 +269,8 @@ export default {
}
},
components: {
webEdit
webEdit,
distributionEnterprise
}
};
</script>
......
......@@ -98,7 +98,7 @@ export default {
let host = window.location.origin;
let baseUrl;
if (host.indexOf('localhost') != '-1') {
baseUrl = 'http://www.gicdev.com';
baseUrl = 'https://www.gicdev.com';
} else {
baseUrl = host;
}
......@@ -125,7 +125,7 @@ export default {
/* eslint-disable */
beforeAvatarUpload(file) {
const that = this;
console.log(file);
// console.log(file);
that.fileType = file.type === 'image/jpeg' ? 'jpeg' : file.type === 'image/jpg' ? 'jpg' : file.type === 'image/png' ? 'png' : file.type == 'video/mp4' ? 'mp4' : '';
const isJPG = file.type === 'image/jpeg' || file.type === 'image/jpg' || file.type === 'image/png';
const isMP4 = file.type == 'video/mp4';
......
......@@ -21,10 +21,14 @@ import * as types from './store/types';
import '../static/css/index.less';
import 'element-ui/lib/theme-chalk/index.css';
import '../static/font/iconfont.css';
import '../static/font//iconfont.js'
import '../theme/index.css';
import '../static/css/dialog.css';
import filters from './filters/index.js';
import SvgIcon from "./components/common/svg-icon"
Vue.component("svg-icon", SvgIcon)
import vueOfficeHeader from '@gic-test/vue-office-header';
import vueOfficeAside from '@gic-test/vue-office-aside';
import vueOfficeArea from '@gic-test/vue-office-area';
......
......@@ -314,7 +314,7 @@ export function scrollTo(element, to, duration) {
const difference = to - element.scrollTop;
const perTick = (difference / duration) * 10;
setTimeout(() => {
console.log(new Date());
// console.log(new Date());
element.scrollTop = element.scrollTop + perTick;
if (element.scrollTop === to) return;
scrollTo(element, to, duration - 10);
......
......@@ -93,14 +93,14 @@ function s2ab(s) {
export function export_table_to_excel(id) {
var theTable = document.getElementById(id);
console.log('a')
// console.log('a')
var oo = generateArray(theTable);
var ranges = oo[1];
/* original data */
var data = oo[0];
var ws_name = "SheetJS";
console.log(data);
// console.log(data);
var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
......@@ -118,7 +118,7 @@ export function export_table_to_excel(id) {
}
function formatJson(jsonData) {
console.log(jsonData)
// console.log(jsonData)
}
export function export_json_to_excel(th, jsonData, defaultTitle) {
......
......@@ -99,8 +99,8 @@
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
<el-button type="text" size="small" @click="handlePreview(scope.$index, scope.row)">预览</el-button>
<el-button type="text" @click="handleDel(scope.$index, scope.row)">删除</el-button>
<el-button type="text" @click="handlePreview(scope.$index, scope.row)">预览</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -74,7 +74,7 @@
</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>
<el-button type="text" @click="toDetail(scope.$index, scope.row)">查看详情</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -68,7 +68,7 @@
</el-tooltip>
</template>
<template slot-scope="scope">
<el-button type="text" size="small" @click="toEditGroup(scope.$index, scope.row)">编辑分组可见范围</el-button>
<el-button type="text" @click="toEditGroup(scope.$index, scope.row)">编辑分组可见范围</el-button>
</template>
</el-table-column> -->
</el-table>
......
......@@ -14,6 +14,10 @@
<i class="el-alert__icon el-icon-info"></i>
<div class="el-alert__content">
<span class="el-alert__title">
<!-- 话务任务应用下线通知:<br />
1.【话务任务】预计将于5月下旬下线,功能将由【销售线索】替代;<br />
2.【话务任务】下线后,【GIC后台-智能营销】中的“话务”事件也将下线,后续如需针对门店终端下发任务,请通过【GIC后台-智能营销】中的“企微任务”事件下发;<br />
3.【话务任务】下线后,该应用中原本的“会话任务”也会下线,“不良评价回访”任务将转移至其他应用,请知悉<br /> -->
1.预计2021年1月功能更新后将仅保留近一年数据,历史数据将清除。如需保存超过一年历史数据,请于1月前导出保存;<br />
2.因任务数据量过大,门店视图统计数据改为每日刷新一次;<br />
3.需要注意:话务完成详情是实时展示;完成数据统计是每日刷新,可能出现任务详情显示已完成,但是已完成数量并没有+1。这属于统计的正常情况。
......@@ -48,8 +52,8 @@
<template slot-scope="scope"> </template>
</el-table-column>
<el-table-column label="门店名称" width="120" show-overflow-tooltip>
<template slot-scope="scope"
><div style="width: 100%; overflow:hidden;text-overflow: ellipsis;">{{ scope.row.storeName }}</div>
<template slot-scope="scope">
<div style="width: 100%; overflow:hidden;text-overflow: ellipsis;">{{ scope.row.storeName }}</div>
</template>
</el-table-column>
<el-table-column prop="" label="任务总数">
......
......@@ -11,7 +11,10 @@
<div class="task-set-content boder-box">
<div class="task-set-cell">
<div class="set-line-item">
<span class="set-line-item_title font-14 color-606266 text-right">话务任务拨打:</span><el-select v-model="setObj.taskCallType" placeholder="请选择" class="w-240" @change="changeSelect"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select><span v-if="setObj.taskCallType == 2" class="font-14 color-909399 p-l-10 set-long-tip">第三方双向呼叫及透传(透传功能暂无法使用,外呼显示号码为固定电话),可监控通话状态。呼叫结算及通话记录存储于GIC计费中心。</span>
<el-tooltip class="item" effect="dark" content="代理商户默认关闭双向呼叫功能,如需开通请联系达摩运营或实施进行开通" placement="top-start" :open-delay="200">
<span class="set-line-item_title text-right"> <i style="cursor: pointer;font-style: normal;padding-bottom: 2px; border-bottom: 1px dashed rgb(47, 84, 235);" class="font-14 color-606266">话务任务拨打</i></span>
</el-tooltip>
<el-select v-model="setObj.taskCallType" placeholder="请选择" class="w-240" @change="changeSelect"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select><span v-if="setObj.taskCallType == 2" class="font-14 color-909399 p-l-10 set-long-tip">第三方双向呼叫及透传(透传功能暂无法使用,外呼显示号码为固定电话),可监控通话状态。呼叫结算及通话记录存储于GIC计费中心。</span>
<span v-if="setObj.taskCallType == 1" class="font-14 color-909399 p-l-10">导购手机呼叫,无法监控通话状态。呼叫结算费用由导购手机自费。</span>
</div>
<!-- <div class="set-line-item">
......@@ -25,7 +28,9 @@
<table class="font-14">
<tbody>
<tr class="el-table__row">
<td rowspan="1" colspan="1" class="el-table_3_column_7 "><div class="font-14 color-303133">微信会员</div></td>
<td rowspan="1" colspan="1" class="el-table_3_column_7 ">
<div class="font-14 color-303133">微信会员</div>
</td>
<td rowspan="1" colspan="1" class="el-table_3_column_8 ">
<div class="cell">
<el-radio v-model="setObj.distributeTypeJudge" :label="0">分配给主门店店长</el-radio>
......@@ -34,7 +39,9 @@
</td>
</tr>
<tr class="el-table__row">
<td rowspan="1" colspan="1" class="el-table_3_column_7 "><div class="font-14 color-303133">POS会员</div></td>
<td rowspan="1" colspan="1" class="el-table_3_column_7 ">
<div class="font-14 color-303133">POS会员</div>
</td>
<td rowspan="1" colspan="1" class="el-table_3_column_8 ">
<div class="cell">
<el-radio v-model="setObj.posDistributeJudge" :label="0">分配给主门店店长</el-radio>
......@@ -62,7 +69,7 @@
<el-radio v-model="setObj.posDistributeJudge" :label="1">分配给专属导购</el-radio>
</div> -->
<div v-if="setObj.taskCallType == 2" class="set-line-item">
<span class="set-line-item_title font-14 color-606266 text-right">话务任务条件:</span><span class="font-14 color-606266">话务任务下发后 </span><el-input-number controls-position="right" class="w-100" v-model="setObj.giveUpJudge" placeholder="请输入内容" :step="1" :step-strictly="true" :min="0" :max="99999999"></el-input-number><span class="font-14 color-606266 p-l-10"></span>
<span class="set-line-item_title font-14 color-606266 text-right">话务任务条件:</span><span class="font-14 color-606266">话务任务下发后 </span> <el-input-number controls-position="right" class="w-100" v-model="setObj.giveUpJudge" placeholder="请输入内容" :step="1" :step-strictly="true" :min="0" :max="99999999"></el-input-number><span class="font-14 color-606266 p-l-10"></span>
<span class="font-14 color-606266">呼叫后无响应,导购可放弃该条话务任务</span>
</div>
<!-- <div class="set-line-item">
......
<template>
<el-dialog width="600px" title="授权校验" class="authMerchant-dailog" :visible.sync="memberVisible" append-to-body :before-close="handleClose">
<div>
<div role="alert" class="el-alert el-alert--info flex w-327 bg-F0F5FF">
<i class="el-alert__icon el-icon-warning font-12 color-2f54eb m-r-9"></i>
<span class="el-alert__title color-303133 font-13">授权商户需要校验GIC商户超级管理员手机号 </span>
</div>
<el-form :model="partForm" :rules="rules" ref="form" label-width="140px" class="dialog-form">
<el-form-item label="超级管理员">
{{ partForm.clerkName | formatName }}
</el-form-item>
<el-form-item label="超级管理员手机号" prop=""
><span v-if="partForm.phoneNumber">{{ partForm.nationCode }}-</span>{{ partForm.phoneNumber | formatPhoneNum }} <el-button class="m-l-35" :disabled="!partForm.phoneNumber" type="text" @click="sendCode()">{{ (disableBtn && countNum == 60) || (!disableBtn && !!countNum) ? '点击短信验证' : countNum + 's' }}</el-button>
</el-form-item>
<el-form-item label="短信验证码" prop="code">
<el-input style="width: 180px;line-height:40px;" maxlength="20" v-model="partForm.code" placeholder="请输入验证码"></el-input>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel('form')">取消</el-button>
<el-button type="primary" @click="submitForm('form')">确定</el-button>
</div>
</el-dialog>
</template>
<script>
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
import showMsg from '@/common/js/showmsg';
import { _debounce } from '@/common/js/public';
// import PhoneNumber from 'awesome-phonenumber';
export default {
name: 'authMerchant-dailog',
components: {},
props: {
item: {
type: Object,
default() {
return { version: '3.0', clerkName: '', enterpriseId: '', enterpriseName: '', nationCode: '86', phoneNumber: '', code: '' };
}
}
},
data() {
return {
wxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId,
memberVisible: true,
partForm: {},
rules: {
code: [
{
required: true,
message: '请输入验证码',
trigger: 'blur'
}
]
},
disableBtn: true, // 发验证码.默认无手机号,不可点击
countNum: 60
};
},
methods: {
/**
* 倒计时
*/
countDown() {
const that = this;
let time = setInterval(function() {
if (that.countNum === 0) {
clearInterval(time);
that.countNum = 60;
that.disableBtn = false;
return false;
}
that.countNum--;
}, 1000);
},
/**
* 发送验证码
*/
sendCode: _debounce(function() {
const that = this;
if (that.partForm.phoneNumber == '' || isNaN(String(that.partForm.phoneNumber))) {
showMsg.showmsg(`超级管理员手机号不正确,请到 GIC 商户后台修改`, 'warning');
return false;
}
/* if (that.partForm.nationCode == '' || isNaN(String(that.partForm.nationCode))) {
showMsg.showmsg(`国家码不存在`, 'warning');
return false;
} */
let params = {
phoneNumber: that.partForm.phoneNumber,
nationCode: that.partForm.nationCode || '86',
type: 1
// isTest: 1 // 测试时使用
};
getRequest('/haoban-manage3-web/send-code', params)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.disableBtn = true;
that.countDown();
const phone = String(that.partForm.phoneNumber);
let handle = phone.substr(0, 3) + '****' + phone.substr(7, phone.length - 1);
showMsg.showmsg(`已发送验证码到${that.partForm.nationCode || '86'}-${handle}`, 'success');
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}, 300),
/**
* 校验验证码
*/
checkCode() {
const that = this;
let params = {
phoneNumber: that.partForm.phoneNumber,
nationCode: that.partForm.nationCode,
type: 1,
code: that.partForm.code
};
return new Promise((resolve, reject) => {
getRequest('/haoban-manage3-web/validate-code', params)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
resolve(true);
return false;
}
errMsg.errorMsg(resData);
resolve(false);
})
.catch(function(error) {
resolve(false);
that.$message.error({
duration: 1000,
message: error.message
});
});
});
},
/**
* 关闭弹窗
*/
handleClose(done) {
const that = this;
that.$refs['form'].resetFields();
that.$emit('refreshData', 'close');
done();
},
cancel() {
const that = this;
that.$refs['form'].resetFields();
that.$emit('refreshData', 'close');
},
/**
* 确定保存
*/
async submitForm(form) {
const that = this;
if (!that.partForm.enterpriseId) {
return false;
}
that.$refs[form].validate(async valid => {
if (valid) {
const flag = await that.checkCode();
if (!flag) {
return false;
}
that.$emit('refreshData', 'success');
} else {
return false;
}
});
},
/**
* 获取数据
*/
getData() {
const that = this;
let params = {
staffId: that.partForm.staffId
};
getRequest('/haoban-manage3-web/staff-add', params)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.partForm = resData.result;
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
item(newData) {
const that = this;
if (Object.keys(this.item).length) {
that.$nextTick(() => {
that.partForm = JSON.parse(JSON.stringify(this.item));
});
}
}
},
mounted() {
const that = this;
if (Object.keys(that.item).length) {
that.$nextTick(() => {
that.partForm = JSON.parse(JSON.stringify(this.item));
});
}
}
};
</script>
<style lang="scss" scoped>
.m-l-35 {
margin-left: 35px;
}
.m-r-9 {
margin-right: 9px;
}
.w-327 {
width: 327px;
}
.font-12 {
font-size: 12px;
}
.el-alert--info {
height: 32px;
padding: 0 0 0 17px;
margin-bottom: 12px;
background: #f0f5ff;
border: 1px solid #85a5ff;
border-radius: 2px;
}
.authMerchant-dailog {
>>> .el-dialog__body {
padding-top: 8px;
padding-left: 21px;
}
>>> .el-form-item {
margin-bottom: 0;
>>> .el-form-item__label {
line-height: 40px;
}
}
>>> .el-dialog__footer {
padding-top: 9px;
}
}
</style>
<style>
.authMerchant-dailog .el-form-item .el-form-item__label {
line-height: 40px;
}
</style>
......@@ -7,19 +7,30 @@
* @LastEditTime: 2020-08-19 17:13:01
-->
<template>
<div class="my-customer-wrap common-set-wrap">
<div class="my-customer-wrap common-set-wrap authMerchant">
<nav-crumb :navpath="navpath"> </nav-crumb>
<div class="right-content">
<div class="right-box" style="min-height: calc(100vh - 104px);">
<div class="apps-content flex" style="min-height: calc(100vh - 104px);">
<div class="apps-content-right">
<div class="flex flex-space-between">
<div></div>
<el-button type="primary" @click="showAddDialog">新建授权</el-button>
<div class="flex flex-space-between flex-align-center">
<div class="overstore-tip">
<div role="alert" class="el-alert el-alert--info flex flex-align-center">
<i class="el-alert__icon el-icon-warning font-13 color-2f54eb"></i>
<div class="el-alert__content">
<p class="el-alert__title color-303133 font-13">绑定门店:绑定门店拥有门店资源管理权限。能查看数据,绑定导购账号,管理门店等。</p>
<p class="el-alert__title color-303133 font-13">刷新门店:编辑或修改绑定门店范围,手动刷新获取最近门店列表。</p>
</div>
</div>
</div>
<div>
<span class="color-909399 font-13 m-r-19">最多授权 10 个商户</span>
<el-button v-if="tableData.length < 10" type="primary" @click="AddAuthMerchant">新建授权</el-button>
</div>
</div>
<div class="m-t-20">
<el-table class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
<el-table-column prop="" label="商户列表" show-overflow-tooltip>
<el-table class="select-table" ref="multipleTable" v-loading="loading" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
<el-table-column prop="" label="审核事项" show-overflow-tooltip>
<template slot-scope="scope">
<div class="ul-li-cell flex">
<div class="cell-img">
......@@ -27,10 +38,10 @@
</div>
<div class="cell-info">
<div class="cell-info-name flex font-14 color-303133">
<span class="gic-name">{{ scope.row.enterpriseName || '--' }}</span
><span class="gic-version">{{ scope.row.version }}</span>
<span class="gic-name color-606266">{{ scope.row.enterpriseName || '--' }}</span
><span class="gic-version color-606266">{{ scope.row.version || '3.0' }}</span>
</div>
<div class="cell-info-name flex font-14 color-303133">
<div class="cell-info-name flex font-14 color-606266">
<span class="gic-name">{{ scope.row.brandName || '--' }}</span>
</div>
</div>
......@@ -38,29 +49,36 @@
</template>
</el-table-column>
<el-table-column prop="" label="提交人" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.staffName || '--' }}</template>
<template slot-scope="scope"
><span class="color-606266">{{ scope.row.staffName || '--' }}</span></template
>
</el-table-column>
<el-table-column prop="" label="完成时间" show-overflow-tooltip>
<template slot-scope="scope">
<div class="line-18">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="line-18">{{ scope.row.createTime | timeStampToHms }}</div>
<div class="line-18 color-606266">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="line-18 color-606266">{{ scope.row.createTime | timeStampToHms }}</div>
</template>
</el-table-column>
<el-table-column prop="" label="操作">
<template slot-scope="scope">
<el-button type="text" @click="AddAuthMerchant(scope.row)">编辑授权设置</el-button>
<el-button type="text" @click="toStoreList(scope.row)">绑定门店列表</el-button>
<el-button slot="reference" type="text" size="small" @click="refreshStoreBind(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">
<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> -->
<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="8"> </dm-pagination>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <vue-gic-footer></vue-gic-footer> -->
<add-enterprise v-if="addShow" @refreshData="refreshData"></add-enterprise>
</div>
</template>
<script>
import addEnterprise from '@/components/company/add-enterprise.vue';
import navCrumb from '@/components/nav/nav.vue';
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
......@@ -85,13 +103,14 @@ export default {
path: ''
}
],
loading: true,
// 分页参数
currentPage: 1,
pageSize: 20,
total: 0,
tableData: [],
addShow: false
addShow: false,
activeBrand: ''
};
},
computed: {},
......@@ -99,9 +118,12 @@ export default {
/**
* 新增企业
*/
showAddDialog() {
const that = this;
that.addShow = true;
AddAuthMerchant(item) {
if (item.enterpriseId) {
this.changeRoute(`authMerchantForm?enterprise=${item.enterpriseId}`);
} else {
this.changeRoute(`authMerchantForm`);
}
},
refreshData(res) {
const that = this;
......@@ -118,6 +140,9 @@ export default {
changeRoute(path) {
this.$router.push(path);
},
toStoreList(item) {
this.changeRoute(`merchantStoreList?enterprise=${item.enterpriseId}`);
},
/**
* 分页---页码变化
......@@ -144,9 +169,11 @@ export default {
*/
getTableList(val) {
const that = this;
that.loading = true;
let para = {};
getRequest('/haoban-manage3-web/wx-enterprise-list', para)
.then(res => {
that.loading = false;
let resData = res.data;
if (resData.errorCode == 1) {
that.tableData = resData.result || [];
......@@ -155,11 +182,46 @@ export default {
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.loading = false;
that.$message.error({
duration: 1000,
message: error.message
});
});
},
refreshStoreBind(item) {
const that = this;
that
.$confirm(`确认要刷新吗?`, '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
that.loading = true;
let para = { enterpriseId: item.enterpriseId };
getRequest('/haoban-manage3-web/flush-bind-store-list', para)
.then(res => {
that.loading = false;
let resData = res.data;
if (resData.errorCode == 1) {
that.$message.success({
duration: 1000,
message: '刷新成功'
});
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.loading = false;
that.$message.error({
duration: 1000,
message: error.message
});
});
})
.catch(() => {});
}
},
watch: {
......@@ -181,8 +243,7 @@ export default {
document.documentElement.style.backgroundColor = '#fff';
},
components: {
navCrumb,
addEnterprise
navCrumb
}
};
</script>
......
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-08-19 17:13:01
-->
<template>
<div class="my-customer-wrap common-set-wrap">
<nav-crumb :navpath="navpath"> </nav-crumb>
<div class="right-content">
<div class="right-box" style="min-height: calc(100vh - 104px);">
<div class="apps-content flex" style="min-height: calc(100vh - 104px);">
<div class="apps-content-right">
<div class="overstore-tip m-b-19">
<div role="alert" class="el-alert el-alert--info flex flex-align-center w-604">
<i class="el-alert__icon el-icon-warning font-13 color-2f54eb"></i>
<div class="el-alert__content">
<p class="el-alert__title color-303133 font-13">授权范围:展示授权商户资源组全部授权范围,包含关联企业的门店和未关联企业的门店</p>
</div>
</div>
</div>
<div class="table-condition m-b-19">
<el-input placeholder="请输入门店名称" maxlength="50" v-model="pageParams.search" class="w-264 " style="width: 264px;" @keyup.native="toInput"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
</div>
<div class="m-t-20">
<el-table class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
<el-table-column prop="" label="门店 " show-overflow-tooltip>
<template slot-scope="scope">
<p class="gic-name color-606266">{{ scope.row.storeName || '' }}</p>
<p class="gic-version color-606266">{{ scope.row.storeCode || '' }}</p>
</template>
</el-table-column>
<el-table-column prop="" label="门店分组" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.storeGroupName || '' }}</template>
</el-table-column>
<el-table-column prop="" label="绑定时间" show-overflow-tooltip>
<template slot-scope="scope">
<div class="line-18 color-606266">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="line-18 color-606266">{{ scope.row.createTime | timeStampToHms }}</div>
</template>
</el-table-column>
</el-table>
<div class="block common-wrap__page text-right m-t-24" v-if="tableData.length">
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageParams.pageNum" :page-sizes="[10, 20, 30]" :page-size="pageParams.pageSize" layout="total, sizes, prev, pager, next" :total="total"> </el-pagination>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <vue-gic-footer></vue-gic-footer> -->
</div>
</template>
<script>
import navCrumb from '@/components/nav/nav.vue';
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
// import { _debounce } from '@/common/js/public';
export default {
name: 'authMerchant',
data() {
return {
bgHeight: window.screen.availHeight - 104 + 'px',
// 面包屑参数
navpath: [
{
name: '首页',
path: '/index'
},
{
name: '通讯录',
path: '/contactsList'
},
{
name: '授权商户',
path: '/authMerchant'
},
{
name: '门店绑定列表',
path: ''
}
],
pageParams: {
pageNum: 1,
pageSize: 20,
enterpriseId: this.$route.query.enterprise || ''
},
// 分页参数
total: 0,
tableData: [],
addShow: false
};
},
computed: {},
methods: {
toInput(res) {
const that = this;
that.pageParams.pageNum = 1;
that.getTableList();
},
/**
* 路由跳转
* @param {path} path
*/
changeRoute(path) {
this.$router.push(path);
},
/**
* 分页---页码变化
* @param {Number} val
*/
handleSizeChange(val) {
const that = this;
that.pageParams.pageNum = 1;
that.pageParams.pageSize = val;
that.getTableList();
},
/**
* 分页---当前页变化
* @param {Number} val
*/
handleCurrentChange(val) {
const that = this;
that.pageParams.pageNum = val;
that.getTableList();
},
/**
* 获取列表数据
*/
getTableList(val) {
const that = this;
let para = { ...this.pageParams };
getRequest('/haoban-manage3-web/bind-store-list', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1 && resData.result) {
that.tableData = resData.result.result || [];
this.total = resData.result.totalCount || 0;
return false;
}
that.tableData = [];
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {},
mounted() {
const that = this;
that.getTableList();
document.documentElement.style.backgroundColor = '#f0f2f5';
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {
navCrumb
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.span-dot {
display: inline-block;
vertical-align: middle;
width: 6px;
height: 6px;
margin-right: 6px;
border-radius: 3px;
&.bg-52c41a {
background: #52c41a;
}
&.bg-f5222d {
background: #f5222d;
}
}
.bg-82C5FF {
background: #82c5ff;
}
.color-508CEE {
color: #508cee;
}
.color-FF585C {
color: #ff585c;
}
.line-h-18 {
line-height: 18px;
}
.m-b-19 {
margin-bottom: 19px;
}
.tooltip-text {
width: 100%;
white-space: pre-wrap;
word-break: break-all;
}
.w-293 {
width: 293px;
}
.w-191 {
width: 191px;
}
.w-604 {
width: 604px;
}
.el-alert--info {
background: rgba(240, 245, 255, 1);
border-radius: 2px;
border: 1px solid rgba(133, 165, 255, 1);
-webkit-box-align: flex-start;
-webkit-align-items: flex-start;
-ms-flex-align: flex-start;
align-items: flex-start;
.el-alert__icon {
font-size: 12px;
padding-top: 3px;
}
}
.my-customer-wrap {
height: 100%;
}
.right-content {
/*width: 100%;*/
padding: 0 20px 20px 20px;
min-height: calc(100% - 160px);
.right-box {
background: #fff;
min-height: 500px;
padding: 0px;
.apps-content {
.apps-content-right {
width: 100%;
padding: 20px;
background: #fff;
.overstore-body {
background: #fff;
}
.daily-set-wrap {
height: 100%;
background: #fff;
}
.app-detail-wrap {
height: 100%;
background: #fff;
}
.common-set-wrap {
height: 100%;
background: #fff;
}
}
}
}
}
.ul-li-cell {
.cell-img {
width: 40px;
min-width: 40px;
max-width: 40px;
height: 40px;
border-radius: 2px;
border: 1px solid rgba(228, 231, 237, 1);
box-sizing: border-box;
img {
width: 100%;
}
}
.cell-info {
padding-left: 10px;
box-sizing: border-box;
.cell-info-name {
max-width: 370px;
height: 20px;
line-height: 19px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.gic-name {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 14px;
color: #303133;
line-height: 18px;
}
.gic-version {
display: inline-block;
padding: 0 5px;
height: 15px;
line-height: 15px;
margin-left: 5px;
background: rgba(255, 241, 240, 1);
border-radius: 2px;
border: 1px solid rgba(255, 163, 158, 1);
font-size: 10px;
color: #f5222d;
}
}
}
</style>
......@@ -119,6 +119,8 @@
<el-button v-if="scope.row.channelCode == 2003" class="cursor-unset" type="text">GIC 同步解绑</el-button>
<el-button v-if="scope.row.channelCode == 2004" class="cursor-unset" type="text">企业同步解绑</el-button>
<el-button v-if="scope.row.channelCode == 2005" class="cursor-unset" type="text">审核被解绑</el-button>
<el-button v-if="scope.row.channelCode == 2006" class="cursor-unset" type="text">权限变更解绑</el-button>
<el-button v-if="scope.row.channelCode == 2007" class="cursor-unset" type="text">门店变更解绑</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -7,7 +7,7 @@
* @LastEditTime: 2020-12-03 15:26:58
-->
<template>
<div class="daily-set-wrap ">
<div class="daily-set-wrap">
<div class="company-set-content border-box">
<div class="company-title m-b-20 flex flex-space-between">
<div class="line-h-32"><span class="color-303133 font-14 font-w-600">企业微信基本信息</span><el-button class="m-l-20" type="text" @click="refeshData">同步刷新 </el-button></div>
......@@ -38,6 +38,8 @@
</el-form-item>
</el-form>
</div>
</div>
<div class="company-set-content border-box">
<div class="company-title m-b-20 m-t-30"><span class="color-303133 font-14 font-w-600">客户密钥维护</span></div>
<div class="company-info-body secret-body">
<div class="m-b-20 secret-cell">
......@@ -80,7 +82,7 @@
</div> -->
<div class="secret-cell m-b-20">
<el-tooltip class="item" effect="dark" content="企业微信中【应用管理】关联的会员小程序secret,请复制后更新至此处。首次使用好办请输入。" placement="top-start"> <span style="cursor: pointer;padding-bottom: 2px; border-bottom: 1px dashed #2F54EB;" class="font-14 color-606266">会员小程序secret:</span></el-tooltip>
<span class="p-l-5 font-14 color-303133 font-w-500">会员小程序信息</span>
<span class="p-l-10 font-14 color-303133 font-w-500">会员小程序信息</span>
<div class="table-cell m-t-10 p-l-137">
<el-table class="no-empty-icon-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
<el-table-column label="小程序名称" show-overflow-tooltip>
......@@ -121,12 +123,47 @@
</el-form>
</div>
</div>
<div class="company-set-content border-box">
<div class="company-title m-b-20 m-t-26 flex flex-space-between flex-align-center">
<p class="color-303133 font-14 font-w-600">小程序添加</p>
<el-button type="primary" @click="addApp">获取小程序</el-button>
</div>
<div class="company-info-body">
<div class="table-cell m-t-10">
<el-table class="no-empty-icon-table" ref="multipleTable" :data="appTableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
<el-table-column label="小程序名称" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.miniprogramName || '--' }}</template>
</el-table-column>
<el-table-column prop="" label="AppID" width="239">
<template slot-scope="scope">
<span>{{ scope.row.appId || '--' }}</span>
</template>
</el-table-column>
<el-table-column prop="" label="最近编辑时间" show-overflow-tooltip>
<template slot-scope="scope">
<div class="line-18">{{ scope.row.updateTime | timeStampToYmd }}</div>
<div class="line-18">{{ scope.row.updateTime | timeStampToHms }}</div>
</template>
</el-table-column>
<el-table-column prop="" label="操作">
<template slot-scope="scope">
<el-button type="text" @click="toAppEdit(scope.$index, scope.row)">编辑</el-button>
<!-- <el-button type="text" @click="toAppDel(scope.$index, scope.row)">删除</el-button> -->
</template>
</el-table-column>
</el-table>
<!-- <div class="text-center add-cell cursor-pointer" @click="addApp"><span class="el-icon-plus font-14 color-2f54eb add-cell-txt"></span><span class="font-14 color-2f54eb p-l-5 add-cell-txt">新建</span></div> -->
</div>
</div>
</div>
<secret-set v-if="addShow" :editRow="editRow" @closeText="closeText" @submitText="submitText"></secret-set>
<app-set v-if="addAppShow" :editRow="appEditRow" :type="appSetType" @closeText="closeAppText" @submitText="submitAppText"></app-set>
</div>
</template>
<script>
import setTip from '@/components/app/set-tip.vue';
import secretSet from '@/components/set/secret-set.vue';
import appSet from '@/components/set/app-set.vue';
import { getRequest, postRequest } from '@/api/api';
import { _debounce } from '@/common/js/public';
import showMsg from '@/common/js/showmsg';
......@@ -175,8 +212,12 @@ export default {
showContactError: false,
showHaobanError: false,
tableData: [],
appTableData: [],
addShow: false,
addAppShow: false,
appSetType: 0,
editRow: {},
appEditRow: {},
// 企微好友
wxShow: false,
wxDate: ''
......@@ -256,6 +297,11 @@ export default {
that.addShow = true;
that.editRow = {};
},
addApp() {
const that = this;
that.addAppShow = true;
that.editRow = { type: 'add' };
},
/**
* 编辑
*/
......@@ -264,17 +310,33 @@ export default {
that.addShow = true;
that.editRow = row;
},
toAppEdit(index, row) {
const that = this;
that.addAppShow = true;
that.appEditRow = Object.assign({}, row, { type: 'edit' });
},
closeText() {
const that = this;
that.addShow = false;
that.editRow = {};
},
closeAppText() {
const that = this;
that.addAppShow = false;
that.appEditRow = {};
},
submitText() {
const that = this;
that.addShow = false;
that.editRow = {};
that.getSecretData();
},
submitAppText() {
const that = this;
that.addAppShow = false;
that.appEditRow = {};
that.getAppData();
},
/**
* 删除
*/
......@@ -291,6 +353,19 @@ export default {
})
.catch(() => {});
},
toAppDel(index, row) {
const that = this;
that
.$confirm('确定删除当前小程序?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
that.postAppDel(index, row);
})
.catch(() => {});
},
postDel(index, row) {
const that = this;
let para = {
......@@ -314,6 +389,29 @@ export default {
});
});
},
postAppDel(index, row) {
const that = this;
let para = {
id: row.miniprogramSettingId
};
postRequest('/haoban-manage3-web/del-miniprogram-setting', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('删除成功', 'success');
that.getAppData();
return;
}
that.getAppData();
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 保存secret
*/
......@@ -478,6 +576,24 @@ export default {
message: error.message
});
});
},
getAppData() {
const that = this;
getRequest('/haoban-manage3-web/list-miniprogram-setting', {})
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.appTableData = resData.result;
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {},
......@@ -485,6 +601,7 @@ export default {
const that = this;
that.$emit('showTab', 1);
document.documentElement.style.backgroundColor = '#f0f2f5';
that.getAppData();
that.getData();
that.getSecretData();
that.getTipData();
......@@ -496,7 +613,8 @@ export default {
},
components: {
setTip,
secretSet
secretSet,
appSet
}
};
</script>
......@@ -584,7 +702,11 @@ export default {
}
.daily-set-wrap {
height: 100%;
margin-top: -10px;
background: #f0f2f5 !important;
.company-set-content {
background: #ffffff;
margin-top: 10px;
padding: 20px;
.table-condition-left {
font-size: 0;
......
......@@ -60,6 +60,11 @@ export default {
tabId: '3',
tabName: '素材库',
icon: 'iconsucaiku'
},
{
tabId: '4',
tabName: '欢迎语',
icon: 'iconhuanyingci'
}
],
activeBrand: '', // 商户(品牌) id
......@@ -113,6 +118,9 @@ export default {
case '3':
that.changeRoute(`material`);
break;
case '4':
that.changeRoute(`salutatory`);
break;
}
},
......
<template>
<div class="daily-set-wrap ">
<div class="daily-set-content border-box">
<div class="admin-tip-body">
<div role="alert" class="el-alert el-alert--info">
<i class="el-alert__icon el-icon-info"></i>
<div class="el-alert__content">
<p class="el-alert__title">
1. 因企业微信接口限制,若在企微管理端为相关人员配置欢迎语,好办设置欢迎语不会生效;<br />
2. 若使用好办欢迎语,请关闭其他企业自建应用/第三方应用的欢迎语配置; <br />
3. 欢迎语的业务场景是为了支持在代理商主体下的外部联系人与总部的会员能互联,暂不支持其他需求场景
</p>
</div>
</div>
</div>
<div class="salutatory-wrap m-t-20">
<div class="top">
<p class="left">欢迎语标题 {{ form.title || '系统默认' }}</p>
<p class="right">
<span class="date">最近编辑时间:{{ form.updateTime | formatTimeStamp }}</span
><el-button type="text" style="margin-right:43px;" @click="changeRoute">编辑</el-button><el-switch v-model="openFlag" :active-value="1" :inactive-value="0" @change="setWelcome"> </el-switch>
</p>
</div>
<p class="line"></p>
<div class="bottom">
<el-form label-width="70px" ref="form" :model="form">
<el-form-item label="文本内容"
><p class="welcome-text">{{ form.welcomeContent || '你好,&lt; 微信昵称 &gt;' }}</p></el-form-item
>
<!-- <el-form-item label="附件"></el-form-item> -->
</el-form>
</div>
</div>
</div>
</div>
</template>
<script>
import { getRequest } from '@/api/api';
// import { _debounce } from '@/common/js/public';
// import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
export default {
props: {},
data() {
return {
form: {},
openFlag: 0
};
},
filters: {},
methods: {
/**
* 跳转
*/
changeRoute() {
this.$router.push('/salutatorySet');
},
/**
* 获取数据
*/
getData() {
const that = this;
getRequest('/haoban-manage3-web/get-welcome', {})
.then(res => {
let resData = res.data;
if (resData.errorCode == 1 && resData.result) {
that.form = { ...resData.result };
that.openFlag = resData.result.openFlag;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
setWelcome(val) {
const that = this;
that.$refs.form.validate(value => {
if (value) {
this.$confirm('是否确定修改欢迎语启用状态?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
getRequest('/haoban-manage3-web/set-welcome', { openFlag: val })
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.$message.success({
duration: 1000,
message: '设置成功'
});
window.location.reload();
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
})
.catch(() => {
that.openFlag = that.openFlag === 1 ? 0 : 1;
});
}
});
}
},
watch: {},
mounted() {
const that = this;
that.$emit('showTab', 4);
document.documentElement.style.backgroundColor = '#f0f2f5';
that.getData();
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {}
};
</script>
<style type="text/scss" lang="scss" scoped>
.bg-ebecf0 {
background: #ebecf0;
}
.color-c0c4cc {
display: inline-block;
line-height: 34px;
padding-left: 10px;
color: #c0c4cc;
}
.condition-tips {
display: inline-block;
vertical-align: middle;
line-height: 32px;
}
.p-l-30 {
padding-left: 30px;
}
.p-l-40 {
padding-left: 40px;
}
.p-l-55 {
padding-left: 55px;
}
.p-l-85 {
padding-left: 85px;
}
.m-l-20 {
margin-left: 20px;
}
.line-50 {
height: 50px;
line-height: 50px;
}
.el-alert--info {
align-items: flex-start;
width: 700px;
padding-top: 5px;
font-size: 14px;
color: #606266;
background: rgba(240, 245, 255, 1);
border-radius: 2px;
border: 1px solid rgba(133, 165, 255, 1);
}
.el-icon-info {
width: 12px;
font-size: 12px;
color: #2f54eb;
margin-top: 5px;
}
.el-alert__content {
padding-left: 9px;
.el-alert__title {
font-size: 13px;
font-weight: 400;
color: #303133;
line-height: 22px;
}
}
.daily-set-wrap {
height: 100%;
.daily-set-content {
padding: 20px;
.table-condition-left {
font-size: 0;
}
}
}
.salutatory-wrap {
// height: 160px;
background: #f5f7fa;
.top {
display: flex;
justify-content: space-between;
align-items: center;
height: 47px;
padding: 0 20px 0 29px;
.left {
font-size: 14px;
font-weight: 600;
color: #303133;
line-height: 20px;
}
.right {
.date {
font-size: 12px;
font-weight: 400;
color: #909399;
line-height: 17px;
margin-right: 30px;
}
}
}
.line {
box-sizing: border-box;
border: 1px solid #e4e7ed;
border-style: none none solid none;
}
.bottom {
padding: 16px 20px 21px 29px;
.el-form-item {
>>> .el-form-item__label {
padding: 0;
}
>>> .el-form-item__label,
>>> .el-form-item__content {
line-height: 20px;
font-size: 14px;
font-weight: 400;
color: #303133;
}
}
}
}
.welcome-text {
text-align: left;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
</style>
<template>
<div class="daily-set-wrap ">
<div class="daily-set-content border-box">
<div class="salutatory-set-wrap m-t-20">
<el-form label-width="117px" ref="form" :model="form" :rules="rules" refs="form">
<el-form-item label="欢迎语标题" prop="title"><el-input show-word-limit placeholder="请输入欢迎语标题" type="text" v-model="form.title" maxlength="20" class="w-384"></el-input> </el-form-item>
<el-form-item label="欢迎语内容" prop="welcomeContent" class="welcomeContentItem">
<el-input show-word-limit placeholder="请输入文本内容" type="textarea" v-model="form.welcomeContent" maxlength="1000" class="w-384 welcomeContent"></el-input>
<div class="text-bottom flex w-384">
<el-popover placement="top" width="388" trigger="click">
<ul class="flex flex-wrap">
<li v-for="(item, index) in emojiList" :key="index + 'emoji'">
<img :src="item.gifUrl" alt="" @click="selectEmoji(item)" />
</li>
</ul>
<p slot="reference" style="cursor:pointer;height:24px;">
<svg-icon iconname="iconbiaoqing" size="20"> </svg-icon>
</p>
</el-popover>
<div class="put" @click="putName">插入&lt; 微信昵称 &gt;</div>
</div>
</el-form-item>
<el-button type="primary" style="margin-left:117px;" @click="submit">保存</el-button>
</el-form>
</div>
</div>
</div>
</template>
<script>
import { getRequest } from '@/api/api';
// import { _debounce } from '@/common/js/public';
// import showMsg from '@/common/js/showmsg';
import limitTextarea from '@/components/limit-textarea.vue';
import errMsg from '@/common/js/error';
import { emojiArr } from '@/utils/emoji';
export default {
props: {},
data() {
return {
form: {
title: '系统默认',
welcomeContent: '你好,<微信昵称>'
},
rules: {
title: [{ required: true, message: '请输入欢迎语标题', trigger: 'blur' }]
},
emojiList: emojiArr
};
},
methods: {
changeRoute() {
this.$router.push('/contactsList');
},
selectEmoji(item) {
const that = this;
const str = that.form.welcomeContent + item.key;
if (str.length > 1000) {
this.$message('添加该表情后文本内容将超过字数限制,无法添加!');
} else {
that.form.welcomeContent = str;
}
},
putName() {
const that = this;
that.form.welcomeContent = that.form.welcomeContent + '<微信昵称>';
},
getData() {
const that = this;
let para = {
wxEnterpriseId: that.wxEnterpriseId
};
getRequest('/haoban-manage3-web/get-welcome', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1 && resData.result) {
that.form = resData.result;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
submit() {
const that = this;
that.$refs.form.validate(value => {
if (value) {
this.$confirm('是否保存此欢迎语?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
const para = { ...that.form };
getRequest('/haoban-manage3-web/save-welcome', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
this.$message({
type: 'success',
message: '保存成功!'
});
window.location.reload();
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
})
.catch();
}
});
}
},
watch: {},
mounted() {
const that = this;
that.$emit('showTab', 4);
document.documentElement.style.backgroundColor = '#f0f2f5';
that.getData();
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {
limitTextarea
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.w-384 {
width: 384px;
box-sizing: border-box;
}
.welcomeContent {
height: 220px;
border: 1px solid #dcdfe6;
border-radius: 2px;
>>> .el-textarea__inner {
height: 181px;
border: none;
&:focus {
box-shadow: none;
}
}
>>> .el-input__count {
bottom: 44px;
}
}
.daily-set-wrap {
height: 100%;
.daily-set-content {
padding: 20px;
.table-condition-left {
font-size: 0;
}
}
}
.salutatory-set-wrap {
>>> .el-input__inner:focus {
box-shadow: none;
}
.welcomeContentItem >>> .el-form-item__content {
position: relative;
width: 384px;
box-sizing: border-box;
.text-bottom {
position: absolute;
bottom: 1px;
left: 1px;
justify-content: space-between;
align-items: center;
height: 38px;
width: 382px;
box-sizing: border-box;
padding: 0 9px;
background: #f5f7fa;
.put {
font-size: 12px;
font-weight: 400;
color: #606266;
line-height: 17px;
cursor: pointer;
}
}
}
}
</style>
......@@ -118,7 +118,18 @@
</div>
</div>
</div>
<!-- <template v-if="taskTipShow">
<div class="task-tip-wrap">
<i class="el-icon-warning"></i>
<div class="task-tip-content">
<p>话务任务应用下线通知:</p>
<p>1. 话务任务预计将于5月下旬下线,功能将由销售线索替代;</p>
<p>2. 后续如需下发任务,请通过GIC智能引擎中企微任务下发;</p>
<p>3. 话务任务下线后,智能引擎话务及好办企微任务也会下线,不良评价任务将转移至其他应用,请知悉。</p>
</div>
<i class="el-icon-close" @click="taskTipClose"></i>
</div>
</template> -->
<!-- <vue-gic-footer></vue-gic-footer> -->
</div>
</div>
......@@ -135,6 +146,7 @@ export default {
name: 'index',
data() {
return {
// taskTipShow: false,
checkShow: true,
tipText: '请先完成商户初始化设置后,再进行其他操作',
projectName: 'haoban-manage-web', // 当前项目名
......@@ -261,7 +273,6 @@ export default {
if (cDay % 10 !== 0 || cDay === 10) {
cDayStr = numString.charAt((cDay - 1) % 10);
}
console.log();
return cDay === 1 ? monString.charAt(cMonth - 1) + '月初一' : monString.charAt(cMonth - 1) + '月' + (cDay < 11 ? '初' : cDay < 20 ? '十' : cDay < 30 ? '廿' : '三十') + cDayStr; // tgString.charAt((cYear - 4) % 10) + dzString.charAt((cYear - 4) % 12) + '年 ' + run + monString.charAt(cMonth - 1) + '月' +
}
},
......@@ -447,6 +458,16 @@ export default {
window.open('');
});
},
// toTipTask() {
// if (!sessionStorage.getItem('taskTip')) {
// this.taskTipShow = true;
// }
// },
// taskTipClose() {
// this.taskTipShow = false;
// sessionStorage.setItem('taskTip', true);
// },
/**
* 获取帮助中心
*/
......@@ -629,7 +650,7 @@ export default {
message: error.message
});
});
},
}
},
async mounted() {
const that = this;
......@@ -637,6 +658,7 @@ export default {
that.wxEnterpriseId = await that.toLogin();
that.getAppData(1);
that.getHelpData();
// that.toTipTask();
/* that.getAppData(2); */
// that.getTipData();
that.getCompanyData();
......@@ -929,9 +951,9 @@ export default {
font-size: 14px;
color: #909399;
&:hover {
color:#2f54ed;
color: #2f54ed;
-webkit-transform: translateX(0px);
-moz-transform: translateX(0px);
-moz-transform: translateX(0px);
transform: translateX(0px);
}
}
......@@ -1021,4 +1043,48 @@ export default {
-webkit-box-shadow: none;
box-shadow: none;
}
@keyframes show {
0% {
top: 0;
opacity: 0;
}
100% {
top: 56px;
opacity: 1;
}
}
.task-tip-wrap {
position: fixed;
top: 56px;
left: 50%;
transform: translateX(-50%);
animation: 0.3s show;
display: flex;
padding: 10px 17px;
background: #f0f5ff;
border-radius: 2px;
border: 1px solid #85a5ff;
.el-icon-warning {
margin-top: 5px;
margin-right: 9px;
font-size: 12px;
color: #2f54eb;
}
.el-icon-close {
font-size: 12px;
color: #909399;
cursor: pointer;
}
.task-tip-content {
font-size: 13px;
font-weight: 400;
color: #303133;
line-height: 22px;
p {
cursor: default;
user-select: none;
}
}
}
</style>
<style></style>
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2018-10-10 14:44:45
* @LastEditors : 无尘
* @LastEditTime : 2020-04-04 09:45:36
-->
<template>
<div class="login-wrap">
<section>
<div class="login-body-head border-box flex">
<img class="login-body-logo" src="../../assets/logo-text.png" alt="logo" />
</div>
<div class="login-body">
<i class="iconfont iconpre" @click="arrowClick('left')"></i>
<i class="iconfont iconnext" @click="arrowClick('right')"></i>
<el-carousel arrow="never" ref="cardShow" height="262px" indicator-position="none" :autoplay="false" @change="changeEnterprise">
<el-carousel-item v-for="item in enterpriseList" :key="item.wxEnterpriseId">
<div class="info flex">
<p class="info_img"><img :src="item.corpSquareLogoUrl" alt="" /></p>
<p class="info_name">{{ item.corpName }}</p>
</div>
</el-carousel-item>
</el-carousel>
<el-button type="primary" @click="toIndex">登录</el-button>
</div>
</section>
</div>
</template>
<script>
import { _debounce } from '@/common/js/public';
import errMsg from '@/common/js/error';
import { getRequest } from '@/api/api';
export default {
name: 'login',
data() {
return {
active: 0,
enterpriseId: '', // 当前选择的 企业 id
// 企业列表
enterpriseList: [
/*{
enterpriseId : '1231',
logoUrl: require("../../assets/logo.png"),
enterpriseName: '达摩网络'
},*/
],
// 登录
numberCode: ''
};
},
computed: {},
methods: {
/**
* 处理路由跳转
*/
toRouterView(val) {
const that = this;
// 模拟检查数据,有两个参数
that.$router.push({
path: val.path
});
},
/**
* 登录
*/
toIndex: _debounce(function() {
const that = this;
that.toLogin();
}, 500),
/**
* 登录 --- api
*/
toLogin() {
const that = this;
const href = `${window.location.origin}/haoban-manage3-web/gic-login?wxEnterpriseId=${that.enterpriseList[that.active].wxEnterpriseId}&random=${that.$route.query.random}`;
window.location.href = href;
},
changeEnterprise(val) {
this.active = val;
},
getList() {
getRequest(`/haoban-manage3-web/login-wx-enterprise-list?random=${this.$route.query.random}`, {})
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
this.enterpriseList = resData.result;
if (resData.result.length === 1) {
this.toLogin();
return;
}
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
this.$message.error({
duration: 1000,
message: error.message
});
});
},
arrowClick(val) {
if (val === 'right') {
this.$refs.cardShow.next();
} else {
this.$refs.cardShow.prev();
}
}
},
mounted() {
const that = this;
if (this.$route.query.random) {
that.getList();
}
if (!!localStorage.getItem('userInfos')) {
localStorage.removeItem('userInfos');
}
},
components: {}
};
</script>
<style lang="scss" scoped>
.login-wrap {
width: 100%;
min-height: 100vh;
padding-top: 178px;
box-sizing: border-box;
background: url('../../assets/BG.png') no-repeat;
background-size: cover;
.login-body-head {
justify-content: center;
align-items: center;
margin-bottom: 34px;
.login-body-logo {
height: 32px;
margin-right: 13px;
}
.login-body-title {
font-size: 16px;
font-weight: 600;
color: #2da8ff;
line-height: 22px;
}
}
.login-body {
position: relative;
width: 430px;
height: 283px;
background: #ffffff;
box-shadow: 0px 6px 8px 0px rgba(215, 218, 231, 0.49);
border-radius: 8px;
margin: 0 auto;
.iconfont {
position: absolute;
top: 116px;
z-index: 4;
font-size: 30px;
color: #ebecf0;
}
.iconpre {
left: 26px;
}
.iconnext {
right: 30px;
}
.info {
padding-top: 70px;
flex-direction: column;
align-items: center;
.info_img {
display: flex;
justify-content: center;
align-items: center;
width: 46px;
height: 46px;
border-radius: 100%;
overflow: hidden;
margin-bottom: 17px;
img {
width: 100%;
}
}
.info_name {
font-size: 14px;
font-weight: 400;
color: #303133;
line-height: 20px;
}
}
}
.el-button {
position: relative;
top: -56px;
z-index: 3;
display: block;
margin: 0 auto;
width: 281px;
height: 40px;
font-size: 16px;
background: #2f54eb;
border-radius: 2px;
}
}
</style>
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-05-14 16:14:12
-->
<template>
<div class="my-customer-wrap common-set-wrap salesleads-wrap">
<vue-office-header :projectName="projectName" @collapseTag="collapseTag" @toRouterView="toRouterView"> </vue-office-header>
<div class="enterprise-wrap__body">
<div id="content" class="content">
<nav-crumb :navpath="navpath" @selectBrandId="selectBrandId"> </nav-crumb>
<div class="content-body">
<div class="right-content border-box">
<div class="right-box" style="min-height: calc(100vh - 86px);">
<div class="apps-content flex" style="min-height: calc(100vh - 86px);">
<div class="apps-content-left w-157" style="min-height: calc(100vh - 86px);">
<common-detail-left :tabListData="tabListData" :activeSelTab="activeSelTab" @setSelectTab="setSelectTab"></common-detail-left>
</div>
<div class="apps-content-right border-box">
<transition name="fade" mode="out-in">
<router-view :brandId="activeBrand" :activeGroupId="activeGroup" :tabType="activeTab" @showTab="showTab"></router-view>
</transition>
</div>
</div>
</div>
</div>
<!-- <vue-gic-footer></vue-gic-footer> -->
<!-- 公共组件 -->
</div>
</div>
</div>
</div>
</template>
<script>
import navCrumb from '@/components/nav/nav-app.vue';
import commonDetailLeft from '@/components/app/app-detail-left.vue';
import vueOfficeHeader from '@/components/vue-office-header';
export default {
name: 'salesleads',
data() {
return {
bgHeight: window.screen.availHeight - 288 + 'px',
activeSelTab: '1',
activeTab: '1',
activeBrand: '',
navpath: [
{
name: '首页',
path: '/index'
},
{
name: '销售线索',
path: ''
}
],
tabListData: [
{
tabId: '0',
tabName: '销售线索记录',
icon: 'iconjichushezhi',
children: [
{
tabId: '1',
tabName: '门店视图'
},
{
tabId: '2',
tabName: '计划视图'
}
]
},
{
tabId: '3',
tabName: '销售线索设置',
icon: 'iconribaoshezhi'
}
]
};
},
computed: {},
methods: {
// 处理路由跳转
toRouterView(val) {
let that = this;
// 模拟检查数据
// //有两个参数
//{
// name:,
// path:
//}
that.$router.push({
path: val.path
});
},
/**
* 路由跳转
*/
changeRoute(path) {
this.$router.push(path);
},
/**
* 选择后返回tabId,做各路由判断
*/
setSelectTab(item) {
let that = this;
that.activeTab = item.tabId;
switch (item.tabId) {
case '0':
that.changeRoute(`/storeList`);
break;
case '1':
that.changeRoute(`/storeList`);
break;
case '2':
that.changeRoute(`/salesTaskList`);
break;
case '3':
that.changeRoute(`/salesleadsSet`);
break;
}
},
selectBrandId(val) {
this.activeBrand = val;
localStorage.setItem('userInfoBrandId', val);
},
/**
* 各路由返回 tabId
*/
showTab(id) {
let that = this;
that.activeTab = id;
that.activeSelTab = id;
that.tabListData.forEach(ele => {
if (ele.tabId == id) {
ele.onlyIconActive = false;
}
if (!!ele.children) {
ele.children.forEach(el => {
if (el.tabId == id) {
ele.onlyIconActive = true;
}
if (!!el.children) {
el.children.forEach(item => {
if (item.tabId == id) {
ele.onlyIconActive = true;
}
});
}
});
}
});
}
},
watch: {
$route: {
handler: function(val, oldVal) {},
// 深度观察监听
deep: true
},
activeGroup: function(newData, oldData) {
const that = this;
that.activeGroup = newData;
}
},
mounted() {
// const that = this;
document.documentElement.style.backgroundColor = '#f0f2f5';
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {
navCrumb,
commonDetailLeft,
vueOfficeHeader
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.bg-82C5FF {
background: #82c5ff;
}
.color-508CEE {
color: #508cee;
}
.color-FF585C {
color: #ff585c;
}
.line-h-18 {
line-height: 18px;
}
.tooltip-text {
width: 100%;
white-space: pre-wrap;
word-break: break-all;
}
.my-customer-wrap {
height: 100%;
}
.content {
padding-top: 46px;
min-width: 1400px;
box-sizing: border-box;
}
.right-content {
/*width: 100%;*/
padding: 0 20px 20px;
min-height: calc(100% - 157px);
.right-box {
background: #fff;
min-height: 500px;
padding: 0px;
.apps-content {
.apps-content-left {
min-width: 157px;
height: 100%;
background: #fff;
overflow-x: hidden;
overflow-y: auto;
.apps-content-left__title {
height: 55px;
line-height: 55px;
padding: 0 0 0 18px;
}
.tab-left-list-cell {
position: relative;
text-align: left;
margin-top: 15px;
height: 30px;
line-height: 30px;
white-space: nowrap;
overflow: hidden;
cursor: pointer;
&:hover {
background: rgba(24, 144, 255, 0.06);
i {
color: #2f54eb;
}
}
&.active-tab {
background: rgba(24, 144, 255, 0.06);
&::before {
content: ' ';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 2px;
background: #2f54eb;
z-index: 1;
}
i {
color: #2f54eb;
}
}
.child-tab-left-list {
li {
position: relative;
text-align: left;
height: 30px;
line-height: 30px;
white-space: nowrap;
overflow: hidden;
cursor: pointer;
&:hover {
background: rgba(24, 144, 255, 0.06);
i {
color: #2f54eb;
}
}
&.active-tab {
background: rgba(24, 144, 255, 0.06);
&::before {
content: ' ';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 2px;
background: #2f54eb;
z-index: 1;
}
i {
color: #2f54eb;
}
}
}
}
}
}
.apps-content-right {
width: calc(100% - 157px);
padding-left: 10px;
background: #f0f2f5;
.daily-set-wrap {
height: 100%;
background: #fff;
}
.app-detail-wrap {
height: 100%;
background: #fff;
}
.common-set-wrap {
height: 100%;
background: #fff;
}
}
}
}
}
</style>
<style lang="scss">
.salesleads-popover {
padding: 14px !important;
.m-b-10 {
margin-bottom: 10px;
}
p {
font-size: 14px;
font-weight: 400;
color: #303133;
line-height: 20px;
}
.temp {
color: #909399;
margin-bottom: 4px;
}
.m-l--6 {
margin-left: -6px;
}
.m-b-14 {
margin-bottom: 14px;
}
}
</style>
<template>
<div class="my-customer-wrap common-set-wrap">
<div class="right-content">
<div class="flex">
<p class="m-r-11 font-14 color-606266">电话方式选择:</p>
<div>
<el-checkbox-group v-model="callType">
<el-checkbox label="1">
<div class="m-b-21" style="display:inline-block;vertical-align:top;">
<p class="l-h-1 m-b-5">公司电话</p>
<p class="tip">1.对接第三方呼叫中心,外呼显示第三方号码,可监控通话状态。费用结算及通话记录存储于GIC计费中心</p>
<p class="tip">2.若任务创建时无双向呼叫权限,此项设置勾选也不生效</p>
</div>
</el-checkbox>
<el-checkbox label="2" class="m-b-24">
<div class="m-b-21" style="display:inline-block;vertical-align:top;">
<p class="l-h-1 m-b-5">私人电话</p>
<p class="tip">导购手机呼叫,无法监控通话状态。呼叫结算费用由导购手机自费</p>
</div>
</el-checkbox>
</el-checkbox-group>
<p><el-button type="primary" @click="submitForm" :loading="loading">保存</el-button><span class="font-14 color-909399 m-l-12">保存后立即生效,历史数据不变,后续下达的任务按新设置运行</span></p>
</div>
</div>
</div>
<!-- <vue-gic-footer></vue-gic-footer> -->
</div>
</template>
<script>
import navCrumb from '@/components/nav/nav.vue';
import { postRequest } from '@/api/api';
import errMsg from '@/common/js/error';
export default {
name: 'authMerchant',
props: {
brandId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
bgHeight: window.screen.availHeight - 104 + 'px',
callType: [], // 0 : 未设置, 1 : 公司电话(双向呼叫), 2 : 私人电话, 多个请用逗号拼接
loading: false
};
},
computed: {},
methods: {
/**
* 路由跳转
* @param {path} path
*/
changeRoute(path) {
this.$router.push(path);
},
submitForm() {
const that = this;
if (that.loading === true) {
return false;
}
that.loading = true;
that
.$confirm('是否确认保存该设置?', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
let para = {
enterpriseId: localStorage.getItem('userInfoBrandId'),
qywxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId
};
if (that.callType.length) {
para.callType = that.callType.join(',');
} else {
para.callType = '0';
}
postRequest('/haoban-task-manage-web/market/clue/web/setting-update', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.$message.success({
duration: 1000,
message: '保存成功!'
});
that.loading = false;
that.getDeatil();
return false;
}
that.loading = false;
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.loading = false;
that.$message.error({
duration: 1000,
message: error.message
});
});
})
.catch(() => {
that.loading = false;
});
},
getDeatil() {
const that = this;
let para = {
enterpriseId: localStorage.getItem('userInfoBrandId'),
qywxEnterpriseId: JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId
};
postRequest('/haoban-task-manage-web/market/clue/web/get-setting', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
if (resData.result && resData.result.callType !== '0') {
that.callType = resData.result.callType.split(',');
} else {
that.callType = [];
}
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
brandId(newV, oldV) {
this.getDeatil();
}
},
mounted() {
this.$emit('showTab', 3);
this.getDeatil();
document.documentElement.style.backgroundColor = '#f0f2f5';
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {
navCrumb
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.right-content {
padding: 33px 0 0 50px;
}
.el-checkbox {
display: flex;
min-height: 22px;
>>> .el-checkbox__label {
padding-top: 1px;
}
}
.el-checkbox + .el-checkbox {
margin-left: 0;
}
.m-l-12 {
margin-left: 12px;
}
.m-r-11 {
margin-right: 11px;
}
.m-b-5 {
margin-bottom: 5px;
}
.m-b-21 {
margin-bottom: 21px;
}
.m-b-24 {
margin-bottom: 24px;
}
.font-14 {
font-size: 14px;
}
.l-h-1 {
line-height: 1;
}
.tip {
font-size: 12px;
color: #909399;
line-height: 22px;
}
</style>
......@@ -580,6 +580,10 @@ input:focus {
margin-right: 10px;
}
.m-r-19 {
margin-right: 19px;
}
.m-r-20 {
margin-right: 20px;
}
......@@ -664,6 +668,10 @@ input:focus {
line-height: 18px;
}
.line-22 {
line-height: 22px;
}
.w-80 {
width: 80px;
}
......@@ -696,6 +704,10 @@ input:focus {
width: 500px;
}
.w-718 {
width: 718px;
}
.el-input.w-500 {
width: 500px;
}
......
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,6 +6,34 @@
"description": "",
"glyphs": [
{
"icon_id": "21128396",
"name": "pre",
"font_class": "pre",
"unicode": "e641",
"unicode_decimal": 58945
},
{
"icon_id": "21128379",
"name": "next",
"font_class": "next",
"unicode": "e640",
"unicode_decimal": 58944
},
{
"icon_id": "9702150",
"name": "欢迎辞",
"font_class": "huanyingci",
"unicode": "e60d",
"unicode_decimal": 58893
},
{
"icon_id": "17853642",
"name": "new",
"font_class": "new",
"unicode": "e61d",
"unicode_decimal": 58909
},
{
"icon_id": "15674954",
"name": "明细备份",
"font_class": "mingxibeifen",
......
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