Commit 4f2f8960 by 张立顺

feat 内容管理功能开发

1 parent aba9cc40
Showing 29 changed files with 2109 additions and 158 deletions
import request from "./request" import request from "./request"
const path = "dj.api." const path = "dj.api."
const path2 = "dj.api.smartcarlife."
// 内容管理列表查询条件可见门店列表 // 内容管理列表查询条件可见门店列表
export function getMerchantList(data) { export function getMerchantList(data) {
...@@ -217,7 +218,7 @@ export function addCustomerLabel(data) { ...@@ -217,7 +218,7 @@ export function addCustomerLabel(data) {
return request(data, "post") return request(data, "post")
} }
/**修改客户标签 */ /** 修改客户标签 */
export function updateCustomerLabel(data) { export function updateCustomerLabel(data) {
data.method = `dj.api.material.customer.label.update` data.method = `dj.api.material.customer.label.update`
return request(data, "post") return request(data, "post")
...@@ -327,3 +328,96 @@ export function getMateralDetail(data) { ...@@ -327,3 +328,96 @@ export function getMateralDetail(data) {
data.method = "dj.api.smartcarlife.reception.home.page.material.detail" data.method = "dj.api.smartcarlife.reception.home.page.material.detail"
return request(data, "post") return request(data, "post")
} }
/** 查询人员标签列表 */
export function findAllLabel(data) {
data.method = `${path2}stafftagcourse.findAllLabel`
return request(data, "post")
}
/** 查询课程列表 */
export function findStaffTagCoursePage(data) {
data.method = `${path2}stafftagcourse.findStaffTagCoursePage`
return request(data, "post")
}
/** 查询课程关联列表 */
export function findStaffTagCourseRelationPage(data) {
data.method = `${path2}stafftagcourse.findStaffTagCourseRelationPage`
return request(data, "post")
}
/** 删除课程关联 */
export function deletecourserelation(data) {
data.method = `${path2}stafftagcourse.deletecourserelation`
return request(data, "post")
}
/** 修改课程关联 */
export function updatecourserelation(data) {
data.method = `${path2}stafftagcourse.updatecourserelation`
return request(data, "post")
}
/** 新增课程关联 */
export function savecourserelation(data) {
data.method = `${path2}stafftagcourse.savecourserelation`
return request(data, "post")
}
/** 分页查询处罚名单 */
export function studyPage(data) {
data.method = `${path2}study.punish.page`
return request(data, "post")
}
/** 导出处罚名单 */
export function studyExport(data) {
data.method = `${path2}study.punish.list.export`
return request(data, "post")
}
/** 操作处罚名单 */
export function studyUpdate(data) {
data.method = `${path2}study.punish.update`
return request(data, "post")
}
// dj.api.smartcarlife.contentManagerTask.study.course.page
// 分页、staffStudyId取列表id
// /** 处罚详情 */
// export function contentManagerTaskPage(data) {
// data.method = `${path2}contentManagerTask.study.course.page `
// return request(data, "post")
// }
/** 查询学习任务-学习情况 */
export function coursePage(data) {
data.method = `${path2}contentManagerTask.study.course.page`
return request(data, "post")
}
/** 查询学习任务-阅读统计 */
export function studyStaffPage(data) {
data.method = `${path2}contentManagerTask.study.staff.page`
return request(data, "post")
}
/** 查询学习任务-学习情况(导出) */
export function courseExport(data) {
data.method = `${path2}contentManagerTask.study.course.list.export`
return request(data, "post")
}
/** 查询学习任务-阅读统计(导出) */
export function contentManagerTaskExport(data) {
data.method = `${path2}contentManagerTask.study.staff.list.export`
return request(data, "post")
}
/** 查询学习任务-学习情况(统计) */
export function contentManagerTaskSummary(data) {
data.method = `${path2}contentManagerTask.study.course.summary`
return request(data, "post")
}
/** 课程详情 */
export function stafftagcourseFind(data) {
data.method = `${path2}stafftagcourse.findById`
return request(data, "post")
}
/** 处罚详情 */
export function contentManagerTaskCourseList(data) {
data.method = `${path2}contentManagerTask.course.list`
return request(data, "post")
}
/** 员工人数详情 */
export function contentManagerTaskListStaffPage(data) {
data.method = `${path2}contentManagerTask.listStaffPage`
return request(data, "post")
}
...@@ -938,7 +938,8 @@ export const contentTypeList = [ ...@@ -938,7 +938,8 @@ export const contentTypeList = [
{ confId: 1, confValue: "图文" }, { confId: 1, confValue: "图文" },
{ confId: 2, confValue: "视频" }, { confId: 2, confValue: "视频" },
{ confId: 3, confValue: "pdf" }, { confId: 3, confValue: "pdf" },
{ confId: 4, confValue: "优秀话术" } { confId: 4, confValue: "优秀话术" },
{ confId: 5, confValue: "学习任务" }
] ]
// 内容管理-员工群发-发送状态 // 内容管理-员工群发-发送状态
......
...@@ -60,6 +60,11 @@ export const routerName = { ...@@ -60,6 +60,11 @@ export const routerName = {
authId: "91304", authId: "91304",
name: "统计", name: "统计",
parentId: "91301" parentId: "91301"
},
{
authId: "91320",
name: "统计",
parentId: "91301"
} }
] ]
}, },
...@@ -158,6 +163,29 @@ export const routerName = { ...@@ -158,6 +163,29 @@ export const routerName = {
], ],
component: _import("contentManager/statisticsList") component: _import("contentManager/statisticsList")
}, },
91320: {
path: "/massSendingStatisticsPage",
name: "massSendingStatisticsPage",
meta: {
title: "统计",
authId: "91320",
parentId: "91301",
cache: false,
activePath: "/staffMassSending"
},
// auth: [
// {
// authId: "9130401",
// parentId: "91304",
// label: "导出",
// category: "Button",
// handle: "exportList"
// }
// ],
component: _import(
"contentManager/staffMassSending/massSendingStatisticsPage"
)
},
91305: { 91305: {
path: "/staffMassSending", path: "/staffMassSending",
...@@ -369,5 +397,62 @@ export const routerName = { ...@@ -369,5 +397,62 @@ export const routerName = {
}, },
auth: [], auth: [],
component: _import("contentManager/customerFile/customerFileDetails") component: _import("contentManager/customerFile/customerFileDetails")
},
91318: {
path: "/labelCourse",
name: "labelCourse",
meta: {
title: "标签课程",
authId: "91318",
parentId: "913",
cache: false
},
auth: [
{
authId: "9131801",
parentId: "91318",
label: "编辑",
handle: "handleEdit"
},
{
authId: "9131802",
parentId: "91318",
label: "删除",
handle: "handleDelete"
}
],
component: _import("contentManager/labelCourse/index")
},
91319: {
path: "/listOfPenalties",
name: "listOfPenalties",
meta: {
title: "学习任务处罚名单",
authId: "91319",
parentId: "913",
cache: false
},
auth: [
{
authId: "9131901",
parentId: "91319",
label: "详情",
handle: "handleDetail"
},
{
authId: "9131902",
parentId: "91319",
label: "停用",
handle: "handleStop",
ruleObj: {
attr: "punishFlag",
rule: {
0: "启用",
1: "停用"
}
}
}
],
component: _import("contentManager/listOfPenalties/index")
} }
} }
<template>
<d2-dialog title="选择品牌" :is-visible="dialogVisible" class="brand-dialog" width="50%" @closeDialog="handleClose"
@confirmDialog="handleConfirm">
<el-form :inline="true" size="mini" class="demo-form-inline">
<el-form-item label="品牌名称:">
<el-input v-model="filterText" placeholder="请输入" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSearch">查询</el-button>
</el-form-item>
</el-form>
<div class="content">
<div class="tree-box">
<div class="title">预选品牌</div>
<el-tree ref="tree" node-key="id" :filter-node-method="filterNode" :data="brandData" :props="defaultProps" show-checkbox
@check-change="handleNodeClick"></el-tree>
</div>
<!-- <div class="check-box">
<div class="title">已选品牌
<el-button type="text" @click="resetChecked">清空</el-button>
</div>
<template v-if="checkList.length == 0">
<div class="no-data">暂无数据</div>
</template>
<template v-else>
<div class="check-list">
<div class="check-item" v-for="item in checkList" :key="item.id">{{ item.label }}<i class="el-icon-close" @click="closeChecked(item)"></i></div>
</div>
</template>
</div> -->
</div>
</d2-dialog>
</template>
<script>
import { deepClone } from "@/common/util"
import { getCarbrandTree } from "@api/contentManager"
export default {
name: "brandTree",
props: {
dialogVisible: Boolean,
defaultKeys: Array
},
data() {
return {
filterText: '',
checked: false,
checkList: [],
brandData: [],
defaultProps: {
children: 'children',
label: 'label'
},
selectList: []
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
defaultKeys(val) {
console.log(val)
this.$nextTick(() => {
// val.forEach(i => {
// this.$refs.tree.setChecked(i, true)
// })
this.$refs.tree.setCheckedKeys(val)
})
}
},
mounted() {
this.getCarbrandTree()
},
methods: {
// 获取品牌树
async getCarbrandTree() {
const res = await getCarbrandTree()
this.brandData = res
},
handleClose() {
this.resetChecked()
this.$emit('close')
},
handleConfirm() {
this.resetChecked()
console.log(this.checkList, 'checkList')
const newList = this.filterCheckList(deepClone(this.checkList))
console.log(newList, 'newList')
this.$emit('submit', {
checkList: this.checkList,
newList: newList
})
},
onSearch() {
this.$refs.tree.filter(this.filterText)
},
handleNodeClick(data) {
console.log(data, this.$refs.tree.getCheckedNodes());
this.checkList = this.$refs.tree.getCheckedNodes()
},
filterCheckList(checkList) {
// 收集所有 children 中的 id
const childrenIds = new Set();
checkList.forEach(item => {
if (item.children && item.children.length > 0) {
item.children.forEach(child => {
childrenIds.add(child.id);
});
}
});
// 过滤掉一级项中 id 存在于 childrenIds 中的项
return checkList.filter(item => !childrenIds.has(item.id));
},
// 清空
resetChecked() {
this.$refs.tree.setCheckedKeys([]);
},
closeChecked(row) {
console.log(row)
this.$refs.tree.setChecked(row.id, false)
console.log(this.$refs.tree.getCheckedNodes())
},
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
handleChange(e) {
console.log(e)
if (e) {
const nodes = this.getTreeArray()
this.$refs.tree.setCheckedKeys(nodes)
} else {
this.$refs.tree.setCheckedKeys([]);
}
},
//获取选择项
getTreeArray() {
let tree_arr = []
this.brandData.forEach(k => {
let child = k.children
if (child && child.length > 0) {
child.forEach(j => {
tree_arr.push(j.id)
})
} else {
tree_arr.push(k.id)
}
})
return tree_arr
},
}
}
</script>
<style scoped lang="scss">
.content {
display: flex;
.title {
display: flex;
align-items: center;
justify-content: space-between;
height: 40px;
opacity: 1;
border-bottom: 1px solid #e5e5e5;
background: #f2f4f7;
padding: 0 16px;
}
.tree-box {
border: 1px solid #e5e5e5;
background: #ffffff;
height: 324px;
overflow-y: auto;
width: 100%;
// margin-right: 20px;
.tree-title {
display: flex;
align-items: center;
height: 40px;
opacity: 1;
border-bottom: 1px solid #e5e5e5;
background: #f2f4f7;
padding: 0 16px;
}
}
.check-box {
flex: 1;
height: 324px;
opacity: 1;
border: 1px solid #e5e5e5;
}
.no-data {
width: 100%;
height: calc(100% - 40px);
display: flex;
align-items: center;
justify-content: center;
}
.check-list {
margin-top: 12px;
height: calc(100% - 64px);
overflow-y: auto;
}
.check-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 4px 16px;
}
}
</style>
<style lang="scss">
.brand-dialog {
.el-dialog__body {
padding: 20px !important;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<!-- 关联门店弹窗 -->
<template>
<d2-dialog :appendToBody="true" title="选择课程" :is-visible.sync="relateStoreVisible" width="50%" btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateStore">
<el-form :model="storeSearchForm" ref="relate" :inline="true">
<el-form-item label="课程名称:">
<el-input v-model.trim="storeSearchForm.courseName" placeholder="课程名称" max-length="20"
@keydown.native="handleStoreInput" clearable />
</el-form-item>
<el-button type="primary" @click="handleCurrentChange(1)">搜索</el-button>
</el-form>
<el-row class="tableCon">
<div class="tableBox">
<el-table ref="seletingTable" :data="selectingData" height="464px" class="table" border @select="handleChange"
@select-all="handleAll">
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="label" label="课程名称" align="center">
<template slot-scope="scope">
{{ scope.row.catalogName + ':' + scope.row.courseTitle }}
</template>
</el-table-column>
</el-table>
<el-pagination small background @current-change="handleCurrentChange" :current-page.sync="currentPage"
:page-size="pageSize" layout="total, prev, pager, next" :total="total" />
</div>
<el-table class="tableBox table" :data="selectedData" border height="464px">
<el-table-column prop="merchantName" label="课程名称" align="center">
<template slot-scope="scope">
{{ scope.row.catalogName + ':' + scope.row.courseTitle }}
</template>
</el-table-column>
<el-table-column label="删除" align="center" width="50px">
<template slot-scope="scope">
<el-button class="el-icon-delete" @click="handleDelete(scope.row)" type="text" />
</template>
</el-table-column>
</el-table>
</el-row>
</d2-dialog>
</template>
<script>
import {
findStaffTagCoursePage
} from "@api/contentManager"
import { deepClone } from "@/common/util"
// import { getBrandList } from "@api/contentManager"
export default {
name: "RelateStoreDialog",
data() {
return {
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 20,
storeSearchForm: {
courseName: ''
}
}
},
props: {
relateStoreVisible: {
type: Boolean,
default: false
},
storeSelected: {
type: Array,
default: () => []
}
},
mounted() {
this.selectedData = deepClone(this.storeSelected)
this.getSelectingList()
},
methods: {
recoverySelection() {
var exitIds = this.selectedData.map((item) => item.courseId)
this.selectingData.forEach((item) => {
exitIds.includes(item.courseId) &&
this.$refs.seletingTable &&
this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
getSelectingList() {
findStaffTagCoursePage({
...this.storeSearchForm,
currentPage: this.currentPage,
pageSize: this.pageSize,
isFlag: true
}).then((res) => {
this.selectingData = res.list
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find((item) => item.courseId === row.courseId)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.courseId !== row.courseId
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
(subItem) => subItem.courseId === item.courseId
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
},
handleDelete(row) {
this.selectedData = this.selectedData.filter((item) => item.courseId !== row.courseId)
const obj = this.selectingData.find((v) => v.courseId == row.courseId)
this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleRelateStoreConfirm() {
this.$emit("handleRelateStoreClose")
this.$emit("handleRelateStoreConfirm", this.selectedData)
},
handleRelateStoreClose() {
this.$emit("handleRelateStoreClose")
}
}
}
</script>
<style lang="scss" scoped>
.table {
margin: 0 auto 20px !important;
width: 95%;
}
.tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 1;
}
}
.service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell {
line-height: 26px !important;
}
.service-store .relateStore .el-table--medium td,
.d2-form .relateStore .el-table--medium td {
padding: 6px 8px !important;
}
.relateStore .red {
color: red;
}
.relateStore .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
</style>
<template> <template>
<d2-dialog <d2-dialog :appendToBody="true" :is-visible="dialogVisible" class="accountDailog" title="选择门店" width="720px"
:is-visible="dialogVisible" @confirmDialog="handleAddConfirm" @closeDialog="handleClose">
class="accountDailog"
title="选择门店"
width="720px"
@confirmDialog="handleAddConfirm"
@closeDialog="handleClose"
>
<div class="tableBox"> <div class="tableBox">
<div style="padding: 10px 50px"> <div style="padding: 10px 50px">
<el-input <el-input v-model="realSearchForm.merchantName" placeholder="搜索门店名称" maxlength="20" clearable size="small"
v-model="realSearchForm.merchantName" style="width: 300px; margin-right: 12px" />
placeholder="搜索门店名称"
maxlength="20"
clearable
size="small"
style="width: 300px; margin-right: 12px"
/>
<el-button size="small" type="primary" @click="searchList"> <el-button size="small" type="primary" @click="searchList">
查询 查询
</el-button> </el-button>
</div> </div>
<d2-table <d2-table ref="merchantTable" :search-form="realSearchForm" :table-params="tableParams" :get-list-api="getListApi"
ref="merchantTable" :before-search-fn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
:search-form="realSearchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
</d2-table> </d2-table>
</div> </div>
</d2-dialog> </d2-dialog>
...@@ -77,7 +59,7 @@ export default { ...@@ -77,7 +59,7 @@ export default {
} }
} }
}, },
mounted() {}, mounted() { },
methods: { methods: {
recoverySelection(list) { recoverySelection(list) {
var exitIds = this.selectedRecord.map((item) => +item.merchantId) var exitIds = this.selectedRecord.map((item) => +item.merchantId)
......
<!-- 关联门店弹窗 --> <!-- 关联门店弹窗 -->
<template> <template>
<d2-dialog <d2-dialog :title="title" :isShowFooter="false" :noCancel="true" :is-visible.sync="relateStoreVisible" width="50%"
:title="title" btn-ok-label="确定" @confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose"
:isShowFooter="false" class="relateStore">
:noCancel="true"
:is-visible.sync="relateStoreVisible"
width="50%"
btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose"
class="relateStore"
>
<slot /> <slot />
<el-row class="tableCon"> <el-row class="tableCon">
<div class="tableBox"> <div class="tableBox">
<!-- height="300px" --> <!-- height="300px" -->
<el-table <el-table ref="seletingTable" :data="selectingData" class="table" border
ref="seletingTable" v-loading="$store.state.d2admin.loading.value">
:data="selectingData"
class="table"
border
v-loading="$store.state.d2admin.loading.value"
>
<el-table-column label="序号" type="index" align="center" width="60"> <el-table-column label="序号" type="index" align="center" width="60">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
(pageNum - 1) * pageSize + scope.$index + 1 (pageNum - 1) * pageSize + scope.$index + 1
}}</template> }}</template>
</el-table-column> </el-table-column>
<!-- @select="handleChange"
@select-all="handleAll" -->
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<!-- <el-table-column prop="merchantName" label="门店名称" align="center">
</el-table-column> -->
<el-table-column prop="staffName" label="员工名称" align="center"> <el-table-column prop="staffName" label="员工名称" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="phoneNumber" label="手机号" align="center"> <el-table-column prop="staffPhone" label="手机号" align="center">
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination small background @current-change="handleCurrentChange" :current-page.sync="pageNum"
small :page-size="pageSize" layout="total, prev, pager, next" :total="total" />
background
@current-change="handleCurrentChange"
:current-page.sync="pageNum"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total"
/>
</div> </div>
</el-row> </el-row>
</d2-dialog> </d2-dialog>
...@@ -76,7 +51,7 @@ export default { ...@@ -76,7 +51,7 @@ export default {
}, },
storeApi: { storeApi: {
type: Function, type: Function,
default: () => {} default: () => { }
}, },
storeSelected: { storeSelected: {
type: Array, type: Array,
...@@ -84,7 +59,7 @@ export default { ...@@ -84,7 +59,7 @@ export default {
}, },
storeSearchForm: { storeSearchForm: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
merchantIds: { merchantIds: {
type: Array, type: Array,
...@@ -107,12 +82,6 @@ export default { ...@@ -107,12 +82,6 @@ export default {
}) })
}, },
getSelectingList() { getSelectingList() {
const _storeSearchForm = this.storeSearchForm
// 会员权益/积分商城获取账户中心所有门店 接口不同 接口新增查询参数merchantName 不需单独处理
// if ([0, 4].includes(this.selectedScene)) {
// // 会员权益,积分商城场景查询门店名称参数
// _storeSearchForm.merchantIdName = _storeSearchForm.merchantName // 账户中心所有门店接口查询条件
// }
console.log(this.storeSearchForm, "this.storeSearchForm") console.log(this.storeSearchForm, "this.storeSearchForm")
this.storeApi({ this.storeApi({
...this.storeSearchForm, ...this.storeSearchForm,
...@@ -184,24 +153,30 @@ export default { ...@@ -184,24 +153,30 @@ export default {
margin: 0 auto 20px !important; margin: 0 auto 20px !important;
width: 98%; width: 98%;
} }
.relateStore .tableCon { .relateStore .tableCon {
margin-top: 20px; margin-top: 20px;
display: flex; display: flex;
.tableBox { .tableBox {
flex: 1; flex: 1;
} }
} }
.service-store .relateStore .el-table .cell, .service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell { .d2-form .relateStore .el-table .cell {
line-height: 26px !important; line-height: 26px !important;
} }
.service-store .relateStore .el-table--medium td, .service-store .relateStore .el-table--medium td,
.d2-form .relateStore .el-table--medium td { .d2-form .relateStore .el-table--medium td {
padding: 6px 8px !important; padding: 6px 8px !important;
} }
.relateStore .red { .relateStore .red {
color: red; color: red;
} }
.relateStore .tip-icon { .relateStore .tip-icon {
position: absolute; position: absolute;
display: inline-block; display: inline-block;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-09-02 16:06:04 * @LastEditTime: 2024-09-02 16:06:04
*/ */
// 内容类型 // 内容类型
export const CONTENT_TYPE_OPTIONS = [ export const CONTENT_TYPE_OPTIONS = [
{ {
...@@ -104,3 +105,75 @@ export const STATUS_ENUM = { ...@@ -104,3 +105,75 @@ export const STATUS_ENUM = {
color: "#EB4E4E" color: "#EB4E4E"
} }
} }
// 学习进度 (1未学习 2未完成 3待考核 4未通过 5已完成)
export const LEARN_PROGRESS_OPTIONS = [
{
id: 1,
label: "未学习",
backgroundColor: "#EB4E4E"
},
{
id: 2,
label: "未完成",
backgroundColor: "#E5E5E5"
},
{
id: 3,
label: "待考核",
backgroundColor: "#FDB757"
},
{
id: 4,
label: "未通过",
backgroundColor: "#EB4E4E"
},
{
id: 5,
label: "已完成",
backgroundColor: "#2CCA74"
}
]
// 任务状态( 0:未开始 1:进行中 2:已结束)
export const TASK_STATUS_OPTIONS = [
{
id: 0,
label: "未开始",
backgroundColor: "#EB4E4E"
},
{
id: 1,
label: "进行中",
backgroundColor: "#FDB757"
},
{
id: 2,
label: "已结束",
backgroundColor: "#8C8C8C"
}
]
// 处罚
export const PUNISH_OPTIONS = [
{
label: "不处罚",
id: "0",
backgroundColor: "#8C8C8C"
},
{
label: "未触发",
id: "1",
backgroundColor: "##FDB757"
},
{
label: "处罚中",
id: "2",
backgroundColor: "#EB4E4E"
},
{
label: "已结束",
id: "3",
backgroundColor: "#8C8C8C"
}
]
// 学习进度 (1未学习 2未完成 3待考核 4未通过 5已完成)
// 完成标准(0无 1学习+考核)
<!-- 规则配置 -->
<template> <template>
<d2-container class="edit-content"> <d2-container class="edit-content">
<div class="content-form"> <div class="content-form">
...@@ -131,8 +130,8 @@ ...@@ -131,8 +130,8 @@
</el-form-item> </el-form-item>
<el-form-item v-if="formData.showChannel == 3" prop="sceneMarketTagList" label="内容标签:" label-width="120px" <el-form-item v-if="formData.showChannel == 3" prop="sceneMarketTagList" label="内容标签:" label-width="120px"
:style="{ 'margin-bottom': '22px' }"> :style="{ 'margin-bottom': '22px' }">
<el-select v-model="formData.sceneMarketTagList" value-key="id" filterable @change="sceneMarketTagChange" multiple <el-select v-model="formData.sceneMarketTagList" value-key="id" filterable @change="sceneMarketTagChange"
placeholder="请选择" style="width: 430px"> multiple placeholder="请选择" style="width: 430px">
<el-option v-for="item in sceneTagsList" :key="item.id" :label="item.tagName" :value="item" <el-option v-for="item in sceneTagsList" :key="item.id" :label="item.tagName" :value="item"
:disabled="formData.sceneMarketTagList.length >= 2 && !formData.sceneMarketTagList.some(selected => selected.id === item.id)"> :disabled="formData.sceneMarketTagList.length >= 2 && !formData.sceneMarketTagList.some(selected => selected.id === item.id)">
</el-option> </el-option>
...@@ -1739,7 +1738,7 @@ export default { ...@@ -1739,7 +1738,7 @@ export default {
const res = await findAllTags() const res = await findAllTags()
this.sceneTagsList = res this.sceneTagsList = res
if (sceneMarketTag) { if (sceneMarketTag) {
this.formData.sceneMarketTagList = sceneMarketTag.split(',').map(item => ({id: parseInt(item)})) this.formData.sceneMarketTagList = sceneMarketTag.split(',').map(item => ({ id: parseInt(item) }))
console.log(this.formData) console.log(this.formData)
} }
}, },
......
<!-- 规则配置 -->
<template> <template>
<d2-container class="container"> <d2-container class="container">
<div class="header" slot="header"> <div class="header" slot="header">
<d2-search <d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData">
ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData">
<div slot="customerLabel"> <div slot="customerLabel">
<el-select v-model="searchForm.customerLabel" clearable value-key="labelId" @focus="focus('tag')" placeholder="请选择"> <el-select v-model="searchForm.customerLabel" clearable value-key="labelId" @focus="focus('tag')"
<el-option-group placeholder="请选择">
v-for="group in tagList" <el-option-group v-for="group in tagList" :key="group.labelId" :label="group.labelName">
:key="group.labelId" <el-option v-for="item in group.nextList" :key="item.labelId" :label="item.labelName" :value="item">
:label="group.labelName">
<el-option
v-for="item in group.nextList"
:key="item.labelId"
:label="item.labelName"
:value="item">
</el-option> </el-option>
</el-option-group> </el-option-group>
</el-select> </el-select>
</div> </div>
<div slot="receptionScene"> <div slot="receptionScene">
<el-select v-model="searchForm.receptionScene" clearable value-key="id" @focus="focus('reception')" placeholder="请选择"> <el-select v-model="searchForm.receptionScene" clearable value-key="id" @focus="focus('reception')"
<el-option placeholder="请选择">
v-for="item in receptionSceneList" <el-option v-for="item in receptionSceneList" :key="item.id" :label="item.receptionSceneName" :value="item">
:key="item.id"
:label="item.receptionSceneName"
:value="item">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
...@@ -56,21 +42,14 @@ ...@@ -56,21 +42,14 @@
</el-button> </el-button>
</span> --> </span> -->
</d2-table-header> </d2-table-header>
<d2-table <d2-table ref="contentTable" :search-form="searchFormSearch" :table-params="tableParams"
ref="contentTable" :get-list-api="getListApi" :before-search-fn="beforeSearchFn">
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<div slot="merchantSlot" slot-scope="scope"> <div slot="merchantSlot" slot-scope="scope">
<div v-if="scope.scope.showMerchant == 0">全部门店</div> <div v-if="scope.scope.showMerchant == 0">全部门店</div>
<div v-else-if="scope.scope.showMerchant == null">-</div> <div v-else-if="scope.scope.showMerchant == null">-</div>
<el-popover v-else placement="top" width="245" trigger="hover"> <el-popover v-else placement="top" width="245" trigger="hover">
<div class="merchant-wrap"> <div class="merchant-wrap">
<div <div class="merchant-name" v-for="(item, index) in scope.scope.assignInfos || []" :key="index">
class="merchant-name"
v-for="(item, index) in scope.scope.assignInfos || []"
:key="index">
{{ item.assignName }} {{ item.assignName }}
</div> </div>
</div> </div>
...@@ -82,11 +61,9 @@ ...@@ -82,11 +61,9 @@
</el-popover> </el-popover>
</div> </div>
<div slot="statusSlot" slot-scope="scope"> <div slot="statusSlot" slot-scope="scope">
<span <span :style="{
:style="{
'background-color': statusEnum[scope.scope.status].color 'background-color': statusEnum[scope.scope.status].color
}" }" class="circle"></span>
class="circle"></span>
<span>{{ statusEnum[scope.scope.status].name }}</span> <span>{{ statusEnum[scope.scope.status].name }}</span>
</div> </div>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
...@@ -121,29 +98,31 @@ ...@@ -121,29 +98,31 @@
</el-button> </el-button>
</template> --> </template> -->
<!-- 查看 --> <!-- 查看 -->
<span style="margin-right: 10px;"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130102']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130102']" />
</span> </span>
<!-- 编辑 --> <!-- 编辑 -->
<span style="margin-right: 10px;"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130106']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130106']" />
</span> </span>
<!-- 删除 --> <!-- 删除 -->
<span v-if="scope.scope.status == 0" style="margin-right: 10px;"> <span v-if="scope.scope.status == 0" style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130107']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130107']" />
</span> </span>
<!-- --> <!-- -->
<template v-else> <template v-else>
<!-- 停用/启用 --> <!-- 停用/启用 -->
<span style="margin-right: 10px;"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130108']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130108']" />
</span> </span>
<!-- 统计 --> <!-- 统计 -->
<span style="margin-right: 10px;"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130103']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130103']" />
</span> </span>
</template> </template>
<el-button v-show="scope.scope.showChannel == 2" type="text" size="mini" @click="handleClone(scope.scope)">克隆</el-button>
<el-button v-show="scope.scope.showChannel == 2" type="text" size="mini"
@click="handleClone(scope.scope)">克隆</el-button>
</div> </div>
</d2-table> </d2-table>
</div> </div>
...@@ -179,7 +158,7 @@ export default { ...@@ -179,7 +158,7 @@ export default {
showChannel: "", showChannel: "",
merchantId: "", merchantId: "",
status: "", status: "",
meal: '' meal: ""
}, },
showFormData: [ showFormData: [
{ {
...@@ -208,7 +187,7 @@ export default { ...@@ -208,7 +187,7 @@ export default {
optionsName: "sceneOptions", optionsName: "sceneOptions",
changeAttr: (value, targetItem) => { changeAttr: (value, targetItem) => {
console.log(value) console.log(value)
if (value !== '') { if (value !== "") {
this.getLabelList(value) this.getLabelList(value)
this.receptionList(value) this.receptionList(value)
} else { } else {
...@@ -280,7 +259,7 @@ export default { ...@@ -280,7 +259,7 @@ export default {
{ {
label: "标题", label: "标题",
prop: "title", prop: "title",
minWidth:120 minWidth: 120
}, },
{ {
label: "类型", label: "类型",
...@@ -328,7 +307,12 @@ export default { ...@@ -328,7 +307,12 @@ export default {
prop: "customerLabelInfoList", prop: "customerLabelInfoList",
minWidth: "300px", minWidth: "300px",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.customerLabelInfoList && cellValue.customerLabelInfoList.length > 0 ? cellValue.customerLabelInfoList.map(item => item.labelName).join(",") : '-' return cellValue.customerLabelInfoList &&
cellValue.customerLabelInfoList.length > 0
? cellValue.customerLabelInfoList
.map((item) => item.labelName)
.join(",")
: "-"
} }
}, },
{ {
...@@ -336,15 +320,25 @@ export default { ...@@ -336,15 +320,25 @@ export default {
prop: "productPackageInfoList", prop: "productPackageInfoList",
width: "200px", width: "200px",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.productPackageInfoList && cellValue.productPackageInfoList.length > 0 ? cellValue.productPackageInfoList.map(item => item.upgradeGoodsName).join(",") : '-' return cellValue.productPackageInfoList &&
cellValue.productPackageInfoList.length > 0
? cellValue.productPackageInfoList
.map((item) => item.upgradeGoodsName)
.join(",")
: "-"
} }
}, },
{ {
label: '接待场景', label: "接待场景",
prop: "receptionSceneInfoList", prop: "receptionSceneInfoList",
width: '120px', width: "120px",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.receptionSceneInfoList && cellValue.receptionSceneInfoList.length > 0 ? cellValue.receptionSceneInfoList.map(item => item.receptionSceneName).join(",") : '-' return cellValue.receptionSceneInfoList &&
cellValue.receptionSceneInfoList.length > 0
? cellValue.receptionSceneInfoList
.map((item) => item.receptionSceneName)
.join(",")
: "-"
} }
}, },
{ {
...@@ -378,7 +372,7 @@ export default { ...@@ -378,7 +372,7 @@ export default {
loading: false, loading: false,
mealList: [ mealList: [
{ {
upgradeGoodsName: 'test1', upgradeGoodsName: "test1",
id: 1 id: 1
} }
], ],
...@@ -454,19 +448,23 @@ export default { ...@@ -454,19 +448,23 @@ export default {
// params.meal = params.meal.join(',') // params.meal = params.meal.join(',')
// } // }
if (params.customerLabel) { if (params.customerLabel) {
params.customerLabelList = [{ params.customerLabelList = [
{
labelId: params.customerLabel.labelId, labelId: params.customerLabel.labelId,
labelName: params.customerLabel.labelName, labelName: params.customerLabel.labelName,
level: 2, level: 2,
parentId: params.customerLabel.parentId parentId: params.customerLabel.parentId
}] }
]
delete params.customerLabel delete params.customerLabel
} }
if (params.receptionScene) { if (params.receptionScene) {
params.receptionSceneInfoList = [{ params.receptionSceneInfoList = [
{
receptionSceneId: params.receptionScene.id, receptionSceneId: params.receptionScene.id,
receptionSceneName: params.receptionScene.receptionSceneName receptionSceneName: params.receptionScene.receptionSceneName
}] }
]
delete params.receptionScene delete params.receptionScene
} }
return params return params
...@@ -491,11 +489,11 @@ export default { ...@@ -491,11 +489,11 @@ export default {
}) })
}, },
goStatisticsPage(row) { goStatisticsPage(row) {
console.log(row)
this.$router.push({ this.$router.push({
name: "statisticsList", name: "statisticsList",
query: { query: {
id: row.id id: row.id
// title: row.title
} }
}) })
}, },
...@@ -593,7 +591,7 @@ export default { ...@@ -593,7 +591,7 @@ export default {
}, },
focus(name) { focus(name) {
console.log(this.searchForm.scene) console.log(this.searchForm.scene)
if (this.searchForm.scene === '') { if (this.searchForm.scene === "") {
return this.$message.error(`请先选择业务场景`) return this.$message.error(`请先选择业务场景`)
} }
// if (name == 'tag') { // if (name == 'tag') {
...@@ -617,6 +615,7 @@ export default { ...@@ -617,6 +615,7 @@ export default {
.merchant-num { .merchant-num {
color: #185efe; color: #185efe;
} }
.circle { .circle {
display: inline-block; display: inline-block;
border-radius: 50%; border-radius: 50%;
...@@ -626,6 +625,7 @@ export default { ...@@ -626,6 +625,7 @@ export default {
margin-right: 6px; margin-right: 6px;
vertical-align: middle; vertical-align: middle;
} }
.merchant-wrap { .merchant-wrap {
max-height: 400px; max-height: 400px;
overflow-y: auto; overflow-y: auto;
......
<!-- 关联门店弹窗 -->
<template>
<d2-dialog :appendToBody="true" title="选择课程" :is-visible.sync="relateStoreVisible" width="50%" btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateStore">
<el-form :model="storeSearchForm" ref="relate" :inline="true">
<el-form-item label="课程名称:">
<el-input v-model.trim="storeSearchForm.courseName" placeholder="课程名称" max-length="20"
@keydown.native="handleStoreInput" clearable />
</el-form-item>
<el-button type="primary" @click="handleCurrentChange(1)">搜索</el-button>
</el-form>
<el-row class="tableCon">
<div class="tableBox">
<el-table ref="seletingTable" :data="selectingData" height="464px" class="table" border @select="handleChange"
@select-all="handleAll">
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="label" label="课程名称" align="center">
<template slot-scope="scope">
{{ scope.row.catalogName + ':' + scope.row.courseTitle }}
</template>
</el-table-column>
</el-table>
<el-pagination small background @current-change="handleCurrentChange" :current-page.sync="currentPage"
:page-size="pageSize" layout="total, prev, pager, next" :total="total" />
</div>
<el-table class="tableBox table" :data="selectedData" border height="464px">
<el-table-column prop="merchantName" label="课程名称" align="center">
<template slot-scope="scope">
{{ scope.row.catalogName + ':' + scope.row.courseTitle }}
</template>
</el-table-column>
<el-table-column label="删除" align="center" width="50px">
<template slot-scope="scope">
<el-button class="el-icon-delete" @click="handleDelete(scope.row)" type="text" />
</template>
</el-table-column>
</el-table>
</el-row>
</d2-dialog>
</template>
<script>
import {
findStaffTagCoursePage
} from "@api/contentManager"
import { deepClone } from "@/common/util"
// import { getBrandList } from "@api/contentManager"
export default {
name: "RelateStoreDialog",
data() {
return {
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 20,
storeSearchForm: {
courseName: ''
}
}
},
props: {
relateStoreVisible: {
type: Boolean,
default: false
},
storeSelected: {
type: Array,
default: () => []
}
},
mounted() {
this.selectedData = deepClone(this.storeSelected)
this.getSelectingList()
},
methods: {
recoverySelection() {
var exitIds = this.selectedData.map((item) => item.courseId)
this.selectingData.forEach((item) => {
exitIds.includes(item.courseId) &&
this.$refs.seletingTable &&
this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
getSelectingList() {
findStaffTagCoursePage({
...this.storeSearchForm,
currentPage: this.currentPage,
pageSize: this.pageSize
}).then((res) => {
this.selectingData = res.list
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find((item) => item.courseId === row.courseId)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.courseId !== row.courseId
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
(subItem) => subItem.courseId === item.courseId
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
},
handleDelete(row) {
this.selectedData = this.selectedData.filter((item) => item.courseId !== row.courseId)
const obj = this.selectingData.find((v) => v.courseId == row.courseId)
this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleRelateStoreConfirm() {
this.$emit("handleRelateStoreClose")
this.$emit("handleRelateStoreConfirm", this.selectedData)
},
handleRelateStoreClose() {
this.$emit("handleRelateStoreClose")
}
}
}
</script>
<style lang="scss" scoped>
.table {
margin: 0 auto 20px !important;
width: 95%;
}
.tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 1;
}
}
.service-store .relateStore .el-table .cell,
.d2-form .relateStore .el-table .cell {
line-height: 26px !important;
}
.service-store .relateStore .el-table--medium td,
.d2-form .relateStore .el-table--medium td {
padding: 6px 8px !important;
}
.relateStore .red {
color: red;
}
.relateStore .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
</style>
<!-- 标签课程 -->
<template>
<d2-container class="customer-tags">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'100px'"
:form-data="showFormData">
</d2-search>
<div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<el-button size="small" type="primary" @click="addLabelCourse">
新增课程标签
</el-button>
</d2-table-header>
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn">
<template slot="tagName" scope="scope">
<div v-for="(item, index) in scope.scope.tagList.split(',')" :key="index">
{{ item }}
</div>
</template>
<template slot="courseList" scope="scope">
<div v-for="(item, index) in scope.scope.tagList.split(',')" :key="index">
{{ item }}
</div>
</template>
<auth-button slot="auth-button" slot-scope="scope" :data="scope.scope" />
</d2-table>
</div>
<labelCourseDialog :recordInfo="recordInfo" v-if="dialogVisible" :dialogVisible.sync="dialogVisible"
@confirmDialogFn="confirmDialogFn">
</labelCourseDialog>
</d2-container>
</template>
<script type="text/ecmascript-6">
import labelCourseDialog from "./labelCourseDialog"
import { Util, deepClone } from "@/common/util"
import {
findStaffTagCourseRelationPage,
deletecourserelation,
updatecourserelation,
savecourserelation
} from "@api/contentManager"
import noDataImg from "@/assets/empty.png"
import dayjs from "dayjs"
export default {
name: "labelCourse",
components: {
labelCourseDialog
},
data() {
return {
recordInfo: null,
dialogVisible: false,
noDataImg,
classifyVisible: false,
searchForm: {
courseName: "",
tagName: ""
// bussinessScene: "",
// merchantId: "",
// scriptMatching: "",
// receptionist: "",
// solutionBrowsing: "",
// searchdate: [new Date(), new Date()]
},
searchFormSearch: {},
currentItem: {},
showFormData: [
{
label: "标签名",
name: "tagName",
type: "input",
isClear: true,
maxlength: 50
},
{
label: "课程名称",
name: "courseName",
type: "input",
isClear: true,
maxlength: 50
},
],
getListApi: findStaffTagCourseRelationPage,
// 表格参数
tableParams: {
listName: "list",
tableOption: {
width: "100"
},
tableColumns: [
{
label: "标签",
prop: "tagList",
minWidth: 260,
addHtml: "tagName",
// formatter: (cellValue) => {
// if (cellValue.tagList) {
// // 使用逗号分割,然后用换行符连接
// return cellValue.tagList.split(',').join('</br>')
// }
// }
},
{
label: "课程列表",
minWidth: 144,
prop: "courseList"
},
// {
// label: "销售姓名",
// prop: "receptionist"
// },
// {
// label: "客户姓名",
// prop: "ownerName",
// minWidth: 140
// },
// {
// label: "品牌车型",
// prop: "brandModel",
// minWidth: 140
// },
// {
// label: "接待场景",
// prop: "receptionSceneName"
// },
// {
// label: "话术匹配",
// formatter: (cellValue) => {
// return cellValue.scriptMatchingCount || 0
// }
// },
// {
// label: "方案浏览",
// formatter: (cellValue) => {
// return cellValue.solutionBrowsingCount || 0
// }
// },
// {
// label: "客户标签",
// minWidth: 270,
// addHtml: "customerTagName"
// },
{
label: "创建时间",
formatter: (cellValue) => {
return cellValue.createdDate
? Util.dateFormate(cellValue.createdDate, "YYYY-MM-DD HH:mm:ss")
: "-"
},
minWidth: 180
},
{
label: "最后更新时间",
formatter: (cellValue) => {
return cellValue.updatedDate
? Util.dateFormate(cellValue.updatedDate, "YYYY-MM-DD HH:mm:ss")
: "-"
},
minWidth: 180
}
]
}
}
},
created() { },
mounted() {
// this.getCustomerFileStatic()
},
methods: {
beforeSearchFn(type = 1) {
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
// if (this.searchForm?.searchdate?.length) {
// let [searchStartDate, searchEndDate] = this.searchForm.searchdate
// this.searchFormSearch.startTime = Util.dateFormate(
// searchStartDate,
// "YYYY-MM-DD"
// )
// this.searchFormSearch.endTime = Util.dateFormate(
// searchEndDate,
// "YYYY-MM-DD"
// )
// const date1 = dayjs(searchStartDate),
// date2 = dayjs(searchEndDate),
// day = date2.diff(date1, "day") + 1
// if (day > 30) {
// reject(
// `${type == 1 ? "查询" : "导出"
// }的时间跨度最大为30天,请重新选择日期范围`
// )
// }
// }
// delete this.searchFormSearch.searchdate
resolve()
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
// this.getCustomerFileStatic()
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
addLabelCourse() {
this.recordInfo = null
this.dialogVisible = true
},
customerTagName(list) {
let tag = []
list.map((e) => {
tag.push(e.labelName)
})
return tag.join("|")
},
handleEdit(row) {
console.log(row)
this.recordInfo = row
this.dialogVisible = true
},
confirmDialogFn(e) {
this.handleSearch()
},
// 删除
handleDelete(row) {
this.$confirm('是否确认删除该课程?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error'
}).then(() => {
deletecourserelation({ id: row.id }).then(res => {
this.notice.okTips()
this.$refs.table.refreshTable()
})
}).catch(err => {
console.log(err)
})
},
// jumpDetail(row) {
// this.$router.push({
// name: "customerFileDetails",
// query: {
// id: row.id,
// receptionSceneName: row.receptionSceneName,
// receptionScene: row.receptionScene,
// scene: row.bussinessScene
// }
// })
// }
}
}
</script>
<style scoped lang="scss">
.emptyBg {
display: flex;
flex-direction: column;
align-items: center;
padding: 120px 0;
.noDataImg {
width: 64px;
height: 40px;
}
}
.error-input {
::v-deep.el-input__inner {
border-color: red;
}
}
.tag-item {
display: flex;
align-items: center;
padding: 0 10px;
justify-content: center;
.tag {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.more-info {
white-space: nowrap;
color: #2a58ad;
cursor: pointer;
margin-left: 2px;
}
}
::v-deep.tags-popover {
max-width: 50vw;
}
.static-box {
display: flex;
gap: 0 16px;
margin-bottom: 12px;
.static-item {
flex: 1;
flex-shrink: 0;
height: 82px;
background: #f8faff;
border-radius: 5px;
box-sizing: border-box;
padding: 16px 20px;
.static-title {
font-size: 14px;
color: #333333;
line-height: 20px;
margin-bottom: 4px;
}
.static-value {
display: flex;
font-weight: 700;
font-size: 24px;
line-height: 30px;
align-items: baseline;
::v-deep.static-unit {
font-weight: 600;
font-size: 14px;
margin: 0 2px;
}
}
}
}
</style>
<template>
<d2-dialog :is-visible="dialogVisible" class="accountDailog" :title="recordInfo ? '编辑课程标签' : '新建课程标签'" width="720px"
@confirmDialog="handleAddConfirm" @closeDialog="handleClose">
<div class="publish-info">
<el-form :model="formData" :rules="rules" ref="channelForm">
<el-form-item label-width="120px" label="员工标签:" prop="tagIds">
<el-button class="radio-box" size="small" @click="selectTagDialog('findAllLabel')">选择标签</el-button>
<div class="customer-box m-t-10">
<div class="el-input-tag input-tag-wrapper">
<div v-for="(subItem, subIdx) in formData.tagIds" :key="subIdx">
<el-tag v-for="(k, n) in subItem.labelList" :key="n" class="customer-tag" size="small" type="info"
:closable="true" :disable-transitions="false" @close="handleDelete(n, subIdx, 'tagIds')">
<span>{{ k.groupAttName }}:{{ k.groupName }}:{{ k.tagName }}</span>
</el-tag>
</div>
</div>
</div>
</el-form-item>
<el-form-item label-width="120px" label="课程标签:" prop="courseIds">
<el-button class="radio-box" size="small" @click="selectTagCourseDialog">选择课程</el-button>
<div class="customer-box m-t-10">
<div class="el-input-tag input-tag-wrapper">
<!-- <div v-for="(subItem, subIdx) in formData.courseIds" :key="subIdx"> -->
<el-tag v-for="(k, n) in formData.courseIds" :key="n" class="customer-tag" size="small" type="info"
:closable="true" :disable-transitions="false" @close="handleDeleteCustomer(n, subItem, 'courseIds')">
<span>{{ k.catalogName + ":" + k.courseTitle }}</span>
</el-tag>
</div>
<!-- </div> -->
</div>
</el-form-item>
</el-form>
</div>
<selectTag ref="selectTagForm" :relateStoreVisible="selectTagVisible" @tagSelected="handleRelateStoreConfirm">
</selectTag>
<findStaffTagCourseDialog :storeSelected="formData.courseIds" v-if="findStaffTagCourseVisible"
:relateStoreVisible="findStaffTagCourseVisible" @handleRelateStoreConfirm="handleRelateConfirm"
@handleRelateStoreClose="findStaffTagCourseVisible = false">
</findStaffTagCourseDialog>
</d2-dialog>
</template>
<script>
import { savecourserelation, updatecourserelation, stafftagcourseFind } from "@api/contentManager"
import findStaffTagCourseDialog from "./findStaffTagCourseDialog"
import selectTag from "./selectTag"
import { deepClone } from "@/common/util"
export default {
name: "listOfPenaltiesDialog",
components: {
selectTag,
findStaffTagCourseDialog
},
props: {
dialogVisible: {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: null
}
},
computed: {
show: {
get() {
return this.dialogVisible
},
set(val) {
this.$emit("update:dialogVisible", val)
}
}
},
data() {
return {
savecourserelation,
updatecourserelation,
tagId: "",
findStaffTagCourseVisible: false,
selectTagVisible: true,
customerLoading: false,
formData: {
// customerDataList: [],
tagIds: [],
courseIds: []
},
rules: {
tagIds: [
{ required: true, message: "请选择员工标签对象", trigger: "change" }
],
courseIds: [
{ required: true, message: "请选择课程列表对象", trigger: "change" }
]
}
}
},
mounted() {
console.log(this.recordInfo)
if (this.recordInfo) {
this.tagId = this.recordInfo.id
this.getStafftagcourseFind()
}
},
methods: {
getStafftagcourseFind() {
stafftagcourseFind({
id: this.tagId,
}).then(res => {
console.log(res)
this.formData.tagIds = res.staffTagGroups.map((item) => {
return {
labelGroup: { id: item.groupAtt, name: item.groupAttName },
labelList: item.staffTagDefinitions.map((el) => {
return {
id: el.id,
name: el.labelName,
...el
}
}),
labelType: item.groupType,
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false
}
})
this.formData.courseIds = res.staffTagCourseRelationDetails
})
},
selectTagDialog(type) {
this.$refs.selectTagForm.init(
{
type,
item: JSON.parse(JSON.stringify(this.formData.tagIds))
}
)
},
selectTagCourseDialog(type) {
this.findStaffTagCourseVisible = true
},
handleRelateConfirm(obj) {
// console.log(obj, 'obj')
this.formData.courseIds = obj
this.$refs.channelForm.validateField('courseIds')
},
handleRelateStoreConfirm(obj) {
this.formData.tagIds = obj
this.$refs.channelForm.validateField('tagIds')
},
handleDeleteCustomer(idx, name) {
this.formData[name].splice(idx, 1)
},
handleDelete(idx, pIdx) {
this.formData.tagIds[pIdx].labelList.splice(idx, 1)
},
handleAddConfirm() {
this.$refs.channelForm.validate(valid => {
console.log(valid, 'valid')
if (valid) {
const params = {}
console.log(this.formData)
params.tagIds = []
this.formData.tagIds.forEach(item => {
item.ids = item.labelList.forEach(el => {
params.tagIds.push(el.id)
})
})
params.courseIds = this.formData.courseIds.map(item => item.courseId)
params.id = this.tagId
const apiName = this.tagId ? 'updatecourserelation' : 'savecourserelation';
this[apiName](params).then(res => {
console.log(res)
this.handleClose()
this.$message.success('保存成功')
this.$emit('confirmDialogFn')
}).catch((err) => {
console.log(err)
})
}
})
},
handleClose() {
// this.$emit("closeDialogFn")
this.show = false
}
}
}
</script>
<style scoped lang="scss">
.publish-info {
// padding: 16px 20px;
::v-deep {
.cell {
padding-left: 0;
padding-right: 0;
}
}
}
.emp-table-box {
// width: 567px;
}
.customer-box {
width: 540px;
height: 150px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #e5e5e5;
.customer-title {
box-sizing: border-box;
height: 39px;
line-height: 39px;
padding: 0 10px;
// border-bottom: 1px solid #dcdfe6;
}
.input-tag-wrapper {
max-height: 150px;
overflow: auto;
position: relative;
font-size: 14px;
padding: 0 10px 10px;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
display: flex;
align-items: center;
font-size: 14px;
.el-tag.el-tag--info .el-tag__close {
color: #909399 !important;
background: transparent !important;
}
.customer-tag {
margin: 4px;
}
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
</style>
<template>
<d2-dialog :is-visible="show" class="accountDailog" title="学习任务情况" btnOkLabel="确认" :noCancel="true" width="720px"
@confirmDialog="handleAddConfirm" @closeDialog="handleClose">
<div class="d2-container-content">
<!-- :before-search-fn="beforeSearchFn" -->
<d2-table ref="recordTable" :search-form="searchFormSearch" :get-list-api="getListApi"
:table-params="tableParams">
<div slot="other" slot-scope="scope">
<div class="online-status">
<span class="dot"
:style="{ background: LEARN_PROGRESS_OPTIONS.find(item => item.id === scope.scope.status).backgroundColor }"></span>
{{LEARN_PROGRESS_OPTIONS.find(item => item.id === scope.scope.status).label}}
</div>
</div>
</d2-table>
</div>
</d2-dialog>
</template>
<script>
import { deepClone } from "@/common/util"
import { LEARN_PROGRESS_OPTIONS } from "../constant"
import { coursePage, contentManagerTaskPage, contentManagerTaskCourseList } from "@/api/contentManager"
export default {
name: "listOfPenaltiesDialog",
props: {
detailInfo: {
type: Object,
require: true
},
dialogVisible: {
type: Boolean,
default: false
}
},
data() {
return {
LEARN_PROGRESS_OPTIONS,
getListApi: coursePage,
searchFormSearch: {
staffStudyId: '',
},
tableData: [],
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// singleSelectUniqueKey: 'id',
tableOption: false,
tableColumns: [
// {
// label: "序号",
// addHtml: "num",
// width: '100'
// },
{
label: '课程名称',
prop: 'courseName',
},
{
label: "学习进度",
prop: "other",
addHtml: "other",
width: '150'
},
]
},
// getListApi: getAllMerchantList,
}
},
computed: {
show: {
get() {
return this.dialogVisible
},
set(val) {
this.$emit("update:dialogVisible", val)
}
}
},
mounted() {
this.searchFormSearch.staffStudyId = this.detailInfo.id
// this.getList()
},
methods: {
handleAddConfirm() {
this.show = false
},
handleClose() {
// this.$emit("closeDialogFn")
this.show = false
}
}
}
</script>
<style scoped lang="scss">
.online-status {
display: flex;
justify-content: center;
align-items: center;
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
.gray {
background-color: #c5c5c5;
}
.orange {
background-color: #fdb757;
}
.blue {
background-color: #2a58ad;
}
}
</style>
<!-- 阅读统计 -->
<template>
<d2-container class="customer-tags">
<div class="header" slot="header">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="'100px'"
:form-data="showFormData">
</d2-search>
<div class="up-btns">
<el-button size="small" type="primary" @click="handleSearch">
查询
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<el-button size="small" type="primary" @click="exportTable">
导出
</el-button>
</d2-table-header>
<d2-table ref="table" :get-list-api="getListApi" :search-form="searchFormSearch" :table-params="tableParams"
:before-search-fn="beforeSearchFn">
<div slot="customerTagName" slot-scope="scope">
<span>{{ readType[scope.scope.readType] || '不强制' }}</span>
</div>
</d2-table>
</div>
</d2-container>
</template>
<script type="text/ecmascript-6">
import { mapActions, mapState } from 'vuex'
import { studyStaffPage, contentManagerTaskExport } from '@api/contentManager'
import { Util, deepClone } from "@/common/util"
import {
getCustomerFilePage,
exportCustomerFile,
getCustomerFileStatic
} from "@api/contentManager"
import noDataImg from "@/assets/empty.png"
import dayjs from "dayjs"
import { listShop4sByRef } from "@api/merchant"
export default {
name: "readStatistics",
data() {
return {
noDataImg,
classifyVisible: false,
searchForm: {
staffPhone: "",
staffName: "",
taskId: ''
},
readType: {
1: '首次强制',
2: '每天强制',
0: '不强制'
},
searchFormSearch: {},
currentItem: {},
showFormData: [
{
label: "员工姓名",
name: "staffName",
type: "input",
maxlength: "20",
isClear: true
},
{
label: "员工手机号",
name: "staffPhone",
type: "input",
maxlength: "20",
isClear: true
}
],
getListApi: studyStaffPage,
// 表格参数
tableParams: {
listName: "list",
tableOption: false,
tableColumns: [
{
label: "员工姓名",
prop: "staffName",
},
{
label: "员工手机号",
minWidth: 144,
prop: "phoneNumber"
},
{
label: "发送时间",
formatter: (cellValue) => {
return cellValue.createdDate
? Util.dateFormate(cellValue.createdDate, "YYYY-MM-DD HH:mm:ss")
: "-"
},
minWidth: 180
},
{
label: "最后查看时间",
formatter: (cellValue) => {
return cellValue.latestReadTime
? Util.dateFormate(cellValue.latestReadTime, "YYYY-MM-DD HH:mm:ss")
: "-"
},
minWidth: 180
},
{
label: "强制阅读",
minWidth: 270,
addHtml: "customerTagName"
},
{
label: "查看次数",
minWidth: 270,
},
]
},
staticData: {}
}
},
computed: {
routerInfo() {
return this.$route.query
},
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
created() { },
mounted() {
this.searchForm.taskId = this.routerInfo.id
// this.getServiceStore()
// this.getCustomerFileStatic()
},
methods: {
...mapActions('d2admin/user', ['actionSetDownloadList']),
beforeSearchFn(type = 1) {
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
// if (this.searchForm?.searchdate?.length) {
// let [searchStartDate, searchEndDate] = this.searchForm.searchdate
// this.searchFormSearch.startTime = Util.dateFormate(
// searchStartDate,
// "YYYY-MM-DD"
// )
// this.searchFormSearch.endTime = Util.dateFormate(
// searchEndDate,
// "YYYY-MM-DD"
// )
// const date1 = dayjs(searchStartDate),
// date2 = dayjs(searchEndDate),
// day = date2.diff(date1, "day") + 1
// if (day > 30) {
// reject(
// `${type == 1 ? "查询" : "导出"
// }的时间跨度最大为30天,请重新选择日期范围`
// )
// }
// }
// delete this.searchFormSearch.searchdate
resolve()
})
},
handleSearch() {
this.page = this.$options.data.call(this).page
this.$refs.table.refreshTable(true, true)
// this.getCustomerFileStatic()
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
async exportTable() {
var params = this.searchForm
params.method = 'dj.api.smartcarlife.contentManagerTask.study.staff.list.export'
const list = [
...this.dowloadList,
{
name: '阅读统计',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
// try {
// await this.beforeSearchFn()
// const res = await contentManagerTaskExport({
// ...this.searchFormSearch
// })
// console.log(res)
// if (res) window.open(res)
// } catch (error) {
// if (error) this.$message.error(error)
// }
},
customerTagName(list) {
let tag = []
list.map((e) => {
tag.push(e.labelName)
})
return tag.join("|")
},
getServiceStore() {
listShop4sByRef({}).then((res) => {
res ||= []
this.showFormData.forEach((item, index) => {
if (item.type === "select" && item.name == "merchantId") {
this.$set(this.showFormData[index], "optionList", [
{
merchantName: "全部",
merchantId: ""
},
...res
])
}
})
})
},
async getCustomerFileStatic() {
try {
await this.beforeSearchFn()
const res = await getCustomerFileStatic({
...this.searchFormSearch
})
console.log(res)
this.staticData = res || {}
} catch (error) {
if (error) this.$message.error(error)
}
},
jumpDetail(row) {
this.$router.push({
name: "customerFileDetails",
query: {
id: row.id,
receptionSceneName: row.receptionSceneName,
receptionScene: row.receptionScene,
scene: row.bussinessScene
}
})
}
}
}
</script>
<style scoped lang="scss">
.emptyBg {
display: flex;
flex-direction: column;
align-items: center;
padding: 120px 0;
.noDataImg {
width: 64px;
height: 40px;
}
}
.error-input {
::v-deep.el-input__inner {
border-color: red;
}
}
.tag-item {
display: flex;
align-items: center;
padding: 0 10px;
justify-content: center;
.tag {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.more-info {
white-space: nowrap;
color: #2a58ad;
cursor: pointer;
margin-left: 2px;
}
}
::v-deep.tags-popover {
max-width: 50vw;
}
.static-box {
display: flex;
gap: 0 16px;
margin-bottom: 12px;
.static-item {
flex: 1;
flex-shrink: 0;
height: 82px;
background: #f8faff;
border-radius: 5px;
box-sizing: border-box;
padding: 16px 20px;
.static-title {
font-size: 14px;
color: #333333;
line-height: 20px;
margin-bottom: 4px;
}
.static-value {
display: flex;
font-weight: 700;
font-size: 24px;
line-height: 30px;
align-items: baseline;
::v-deep.static-unit {
font-weight: 600;
font-size: 14px;
margin: 0 2px;
}
}
}
}
.online-status {
display: flex;
justify-content: center;
align-items: center;
.dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 8px;
}
.gray {
background-color: #c5c5c5;
}
.orange {
background-color: #fdb757;
}
.blue {
background-color: #2a58ad;
}
}
</style>
...@@ -5,13 +5,8 @@ ...@@ -5,13 +5,8 @@
<d2-container> <d2-container>
<!-- <div class="offline-account"> --> <!-- <div class="offline-account"> -->
<div class="header" slot="header" style="padding: 10px 20px"> <div class="header" slot="header" style="padding: 10px 20px">
<d2-search <d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="labelWidth"
ref="showSearch" :form-data="showFormData" />
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData"
/>
<div class="up-btns"> <div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary"> <el-button @click="handleSearch" size="small" type="primary">
查询 查询
...@@ -25,30 +20,19 @@ ...@@ -25,30 +20,19 @@
<d2-table-header> <d2-table-header>
<auth-button category="Button" /> <auth-button category="Button" />
</d2-table-header> </d2-table-header>
<d2-table <d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch"
ref="recordTable" :table-params="tableParams" :before-search-fn="beforeSearchFn">
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px"> <span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130502']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130502']" />
</span> </span>
<span <span style="margin-right: 10px" v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2">
style="margin-right: 10px"
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"
>
<auth-button :data="scope.scope" :show-btn-ids="['9130503']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130503']" />
</span> </span>
<span style="margin-right: 10px" v-if="scope.scope.sendStatus == 3"> <span style="margin-right: 10px" v-if="scope.scope.sendStatus == 3">
<auth-button :data="scope.scope" :show-btn-ids="['9130504']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130504']" />
</span> </span>
<span <span style="margin-right: 10px" v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2">
style="margin-right: 10px"
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"
>
<auth-button :data="scope.scope" :show-btn-ids="['9130505']" /> <auth-button :data="scope.scope" :show-btn-ids="['9130505']" />
</span> </span>
</div> </div>
...@@ -326,7 +310,7 @@ export default { ...@@ -326,7 +310,7 @@ export default {
goStatisticsPage(row) { goStatisticsPage(row) {
this.$router.push({ this.$router.push({
name: "statisticsPage", name: row.contentType == 5 ? "massSendingStatisticsPage" : "statisticsPage",
query: { query: {
id: row.id, id: row.id,
title: row.title title: row.title
......
<!-- 员工群发统计页面 -->
<template>
<div class="performance-list-wrap">
<div class="title">
问界原厂权益销售重要通知
<el-button size="small">返回</el-button>
</div>
<div class="header" slot="header">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabPaneList" :label="item.label" :name="item.name" :key="index">
</el-tab-pane>
</el-tabs>
</div>
<components class="components" :is="tabName" :active-name="activeName"></components>
</div>
</template>
<script>
import readStatistics from "../massSendingStatisticsPage/readStatistics.vue"
import learningSituation from "../massSendingStatisticsPage/learningSituation.vue"
export default {
name: "massSendingStatisticsPage",
components: {
readStatistics,
learningSituation
},
data() {
return {
activeName: "0",
tabPaneList: [
{
label: "阅读统计",
name: "0"
},
{
label: "学习情况",
name: "1"
}
],
tabName: "readStatistics"
}
},
mounted() {
if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane
this.tabName = this.$route.params.tabLabel
}
},
watch: {},
methods: {
handleClick() {
const arr = {
0: "readStatistics",
1: "learningSituation"
}
this.tabName = arr[+this.activeName]
}
}
}
</script>
<style scoped lang="scss">
.performance-list-wrap {
// box-sizing: border-box;
padding: 0 20px;
.title {
padding: 0 20px;
color: #333333;
font-size: 18px;
font-weight: 600;
line-height: 50px;
background-color: #fff;
height: 50px;
border-bottom: 1px solid #e5e5e5;
}
// margin-bottom: 20px;
.header {
// height: 100px;
// background-color: #fff;
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
.components {
margin-top: 90px;
}
}
</style>
<!-- 规则配置 --> <!-- 内容管理统计 -->
<template> <template>
<d2-container class="container"> <d2-container class="container">
<div class="header" slot="header"> <div class="header" slot="header">
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
ref="showSearch" ref="showSearch"
class="show-search" class="show-search"
:search-form="searchForm" :search-form="searchForm"
:form-data="showFormData"> :form-data="showFormData"
>
</d2-search> </d2-search>
<div class="up-btns"> <div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary" handle> <el-button :id="tableParams.btnId" size="small" type="primary" handle>
...@@ -25,7 +26,8 @@ ...@@ -25,7 +26,8 @@
:search-form="realSearchForm" :search-form="realSearchForm"
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn"
>
</d2-table> </d2-table>
</div> </div>
</d2-container> </d2-container>
......
...@@ -1601,9 +1601,9 @@ export default { ...@@ -1601,9 +1601,9 @@ export default {
this.formList[this.findFormIdx("bankCounty")].optionList = res.areaList this.formList[this.findFormIdx("bankCounty")].optionList = res.areaList
this.editForm.bankProvince = res.province this.editForm.bankProvince = res.province
this.editForm.bankCity = res.city this.editForm.bankCity = res.city
this.editForm.provinceCode = res.provinceCode || "5800" this.editForm.provinceCode = res.provinceCode
this.editForm.cityCode = res.cityCode || "6030" this.editForm.cityCode = res.cityCode
this.editForm.bankCounty = "6030" // this.editForm.bankCounty = "6030"
this.editForm.province = res.province this.editForm.province = res.province
this.editForm.city = res.city this.editForm.city = res.city
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!