Commit b43830d3 by 张立顺

Merge branch 'hotfix_V4.46.2-1119' of http://192.168.3.233:8090/saas_plus/dj-car…

…-life-system into hotfix_V4.46.2-1119
2 parents 181fc3fe ba592f3d
Showing 133 changed files with 705 additions and 198 deletions

416 Bytes | W: | H:

1.1 KB | W: | H:

public/menuIcon/contentManager.png
public/menuIcon/contentManager.png
public/menuIcon/contentManager.png
public/menuIcon/contentManager.png
  • 2-up
  • Swipe
  • Onion skin

453 Bytes | W: | H:

661 Bytes | W: | H:

public/menuIcon/financeManage.png
public/menuIcon/financeManage.png
public/menuIcon/financeManage.png
public/menuIcon/financeManage.png
  • 2-up
  • Swipe
  • Onion skin

438 Bytes | W: | H:

1006 Bytes | W: | H:

public/menuIcon/flowManage.png
public/menuIcon/flowManage.png
public/menuIcon/flowManage.png
public/menuIcon/flowManage.png
  • 2-up
  • Swipe
  • Onion skin

406 Bytes | W: | H:

809 Bytes | W: | H:

public/menuIcon/goods.png
public/menuIcon/goods.png
public/menuIcon/goods.png
public/menuIcon/goods.png
  • 2-up
  • Swipe
  • Onion skin

410 Bytes | W: | H:

910 Bytes | W: | H:

public/menuIcon/index.png
public/menuIcon/index.png
public/menuIcon/index.png
public/menuIcon/index.png
  • 2-up
  • Swipe
  • Onion skin

528 Bytes | W: | H:

891 Bytes | W: | H:

public/menuIcon/orderManage.png
public/menuIcon/orderManage.png
public/menuIcon/orderManage.png
public/menuIcon/orderManage.png
  • 2-up
  • Swipe
  • Onion skin

502 Bytes | W: | H:

999 Bytes | W: | H:

public/menuIcon/pointManagement.png
public/menuIcon/pointManagement.png
public/menuIcon/pointManagement.png
public/menuIcon/pointManagement.png
  • 2-up
  • Swipe
  • Onion skin

601 Bytes | W: | H:

785 Bytes | W: | H:

public/menuIcon/purchaseManage.png
public/menuIcon/purchaseManage.png
public/menuIcon/purchaseManage.png
public/menuIcon/purchaseManage.png
  • 2-up
  • Swipe
  • Onion skin

410 Bytes | W: | H:

734 Bytes | W: | H:

public/menuIcon/residentManage.png
public/menuIcon/residentManage.png
public/menuIcon/residentManage.png
public/menuIcon/residentManage.png
  • 2-up
  • Swipe
  • Onion skin

360 Bytes | W: | H:

898 Bytes | W: | H:

public/menuIcon/rightsAndInterestsManage.png
public/menuIcon/rightsAndInterestsManage.png
public/menuIcon/rightsAndInterestsManage.png
public/menuIcon/rightsAndInterestsManage.png
  • 2-up
  • Swipe
  • Onion skin

406 Bytes | W: | H:

427 Bytes | W: | H:

public/menuIcon/stockManage.png
public/menuIcon/stockManage.png
public/menuIcon/stockManage.png
public/menuIcon/stockManage.png
  • 2-up
  • Swipe
  • Onion skin

360 Bytes | W: | H:

678 Bytes | W: | H:

public/menuIcon/systemConfig.png
public/menuIcon/systemConfig.png
public/menuIcon/systemConfig.png
public/menuIcon/systemConfig.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -3,200 +3,244 @@ import request from "./request" ...@@ -3,200 +3,244 @@ import request from "./request"
const path = "dj.api." const path = "dj.api."
// 内容管理列表查询条件可见门店列表 // 内容管理列表查询条件可见门店列表
export function getMerchantList(data) { export function getMerchantList (data) {
data.method = `dj.smartcarlife.api.shopMerchant.list` data.method = `dj.smartcarlife.api.shopMerchant.list`
return request(data) return request(data)
} }
// 内容管理列表查询 // 内容管理列表查询
export function getContenttList(data) { export function getContenttList (data) {
data.method = `${path}material.record.page` data.method = `${path}material.record.page`
return request(data) return request(data)
} }
// 内容管理详情 // 内容管理详情
export function getContentDetail(data) { export function getContentDetail (data) {
data.method = `${path}material.record.detail` data.method = `${path}material.record.detail`
return request(data) return request(data)
} }
// 批量启停用内容 // 批量启停用内容
export function batchOperaterContent(data) { export function batchOperaterContent (data) {
data.method = `${path}material.record.batch.operate` data.method = `${path}material.record.batch.operate`
return request(data) return request(data)
} }
// 删除内容 // 删除内容
export function delContent(data) { export function delContent (data) {
data.method = `${path}material.record.delete` data.method = `${path}material.record.delete`
return request(data) return request(data)
} }
// 统计列表 // 统计列表
export function getStatisticsList(data) { export function getStatisticsList (data) {
data.method = `dj.api.customer.dynamic.record.page` data.method = `dj.api.customer.dynamic.record.page`
return request(data) return request(data)
} }
// 导出统计列表 // 导出统计列表
export function exportStatisticsList(data) { export function exportStatisticsList (data) {
data.method = `dj.api.customer.dynamic.record.page.export` data.method = `dj.api.customer.dynamic.record.page.export`
return request(data) return request(data)
} }
// 新增内容 // 新增内容
export function addContent(data) { export function addContent (data) {
data.method = `${path}material.record.add` data.method = `${path}material.record.add`
return request(data, "post") return request(data, "post")
} }
// 编辑内容 // 编辑内容
export function updateContent(data) { export function updateContent (data) {
data.method = `${path}material.record.update` data.method = `${path}material.record.update`
return request(data, "post") return request(data, "post")
} }
// 获取会员权益/升级和积分商城 门店 // 获取会员权益/升级和积分商城 门店
export function getAllMerchantList(data) { export function getAllMerchantList (data) {
data.method = `dj.api.merchant.page` data.method = `dj.api.merchant.page`
return request(data, "POST") return request(data, "POST")
} }
// 获取精品升级/次新车转化/售后众筹 门店 // 获取精品升级/次新车转化/售后众筹 门店
export function getMerchantListByScene(data) { export function getMerchantListByScene (data) {
data.method = `dj.api.scenemerchantref.listShop4sByRef.page` data.method = `dj.api.scenemerchantref.listShop4sByRef.page`
return request(data) return request(data)
} }
// 获取精品升级/次新车转化/售后众筹 门店 // 获取精品升级/次新车转化/售后众筹 门店
export function getListShop4sByRef(data) { export function getListShop4sByRef (data) {
data.method = `dj.api.scenemerchantref.listShop4sByRef` data.method = `dj.api.scenemerchantref.listShop4sByRef`
return request(data) return request(data)
} }
// 获取品牌列表 // 获取品牌列表
export function getBrandList(data) { export function getBrandList (data) {
data.method = `dj.api.smartcarlife.common.car.brand.page` data.method = `dj.api.smartcarlife.common.car.brand.page`
return request(data) return request(data)
} }
// 分页查询标签员工 // 分页查询标签员工
export function getListLabelStaffPage(data) { export function getListLabelStaffPage (data) {
data.method = `dj.api.smartcarlife.contentManagerTask.listLabelStaffPage` data.method = `dj.api.smartcarlife.contentManagerTask.listLabelStaffPage`
return request(data) return request(data)
} }
// 员工群发-分页查询列表 // 员工群发-分页查询列表
export function contentManagerTaskPage(data) { export function contentManagerTaskPage (data) {
data.method = `dj.api.smartcarlife.contentManagerTask.page` data.method = `dj.api.smartcarlife.contentManagerTask.page`
return request(data, "POST") return request(data, "POST")
} }
// 员工群发-删除记录 // 员工群发-删除记录
export function deleteTaskById(data) { export function deleteTaskById (data) {
data.method = `dj.api.smartcarlife.contentManagerTask.deleteById` data.method = `dj.api.smartcarlife.contentManagerTask.deleteById`
return request(data, "POST") return request(data, "POST")
} }
// 员工群发-分页查询内容管理统计信息 // 员工群发-分页查询内容管理统计信息
export function getStatisticPage(data) { export function getStatisticPage (data) {
data.method = `dj.api.smartcarlife.contentManagerTask.statistic.page` data.method = `dj.api.smartcarlife.contentManagerTask.statistic.page`
return request(data, "POST") return request(data, "POST")
} }
// 员工群发-添加/修改记录 // 员工群发-添加/修改记录
export function insertOrUpdate(data) { export function insertOrUpdate (data) {
data.method = `dj.api.smartcarlife.contentManagerTask.insertOrUpdate` data.method = `dj.api.smartcarlife.contentManagerTask.insertOrUpdate`
return request(data, "POST") return request(data, "POST")
} }
// 根据ID查询详细信息 // 根据ID查询详细信息
export function contentManagerTaskById(data) { export function contentManagerTaskById (data) {
data.method = `dj.api.smartcarlife.contentManagerTask.getById` data.method = `dj.api.smartcarlife.contentManagerTask.getById`
return request(data, "POST") return request(data, "POST")
} }
// 获取接待场景 // 获取接待场景
export function receptionSceneList(data) { export function receptionSceneList (data) {
data.method = "dj.api.material.reception.scene.list" data.method = "dj.api.material.reception.scene.list"
return request(data, "POST") return request(data, "POST")
} }
// 获取客户标签树 // 获取客户标签树
export function getLabelList(data) { export function getLabelList (data) {
data.method = "dj.api.material.customer.label.list" data.method = "dj.api.material.customer.label.list"
return request(data, "POST") return request(data, "POST")
} }
// 单一商品 // 单一商品
export function listAllInWithPage(data) { export function listAllInWithPage (data) {
data.method = "dj.api.smartcarlife.upgradeGoods.listAllInWithPage" data.method = "dj.api.smartcarlife.upgradeGoods.listAllInWithPage"
return request(data, "POST") return request(data, "POST")
} }
// 套餐商品 // 套餐商品
export function allInPage(data) { export function allInPage (data) {
data.method = "dj.api.smartcarlife.merchantPackageGoodsInfo.allInPage" data.method = "dj.api.smartcarlife.merchantPackageGoodsInfo.allInPage"
return request(data, "POST") return request(data, "POST")
} }
// 获取产品词条列表 // 获取产品词条列表
export function productTextPage(data) { export function productTextPage (data) {
data.method = "dj.api.material.product.text.page" data.method = "dj.api.material.product.text.page"
return request(data, "POST") return request(data, "POST")
} }
// 分页获取产品词条列表 // 分页获取产品词条列表
export function productPage(data) { export function productPage (data) {
data.method = `dj.api.material.product.text.page` data.method = `dj.api.material.product.text.page`
return request(data, "POST") return request(data, "POST")
} }
// 获取产品词条详情 // 获取产品词条详情
export function productDetail(data) { export function productDetail (data) {
data.method = `dj.api.material.product.text.detail` data.method = `dj.api.material.product.text.detail`
return request(data, "POST") return request(data, "POST")
} }
// 删除产品词条 // 删除产品词条
export function productDelete(data) { export function productDelete (data) {
data.method = `dj.api.material.product.text.delete` data.method = `dj.api.material.product.text.delete`
return request(data, "POST") return request(data, "POST")
} }
// 保存产品词条 // 保存产品词条
export function productSave(data) { export function productSave (data) {
data.method = `dj.api.material.product.text.save` data.method = `dj.api.material.product.text.save`
return request(data, "POST") return request(data, "POST")
} }
// 更新产品词条 // 更新产品词条
export function productUpdate(data) { export function productUpdate (data) {
data.method = `dj.api.material.product.text.update` data.method = `dj.api.material.product.text.update`
return request(data, "POST") return request(data, "POST")
} }
// 查询接待素材商户配置 // 查询接待素材商户配置
export function materialPage(data) { export function materialPage (data) {
data.method = `dj.api.smartcarlife.recepiton.material.page` data.method = `dj.api.smartcarlife.recepiton.material.page`
return request(data, "post", [], "", "/rop-dj-car-boutique/router") return request(data, "post", [], "", "/rop-dj-car-boutique/router")
} }
// 查询门店接待素材详情 // 查询门店接待素材详情
export function materialDetail(data) { export function materialDetail (data) {
data.method = `dj.api.smartcarlife.recepiton.material.merchant.detail` data.method = `dj.api.smartcarlife.recepiton.material.merchant.detail`
return request(data, "post", [], "", "/rop-dj-car-boutique/router") return request(data, "post", [], "", "/rop-dj-car-boutique/router")
} }
// 保存更新门店接待素材 // 保存更新门店接待素材
export function recepitonUpdate(data) { export function recepitonUpdate (data) {
data.method = `dj.api.smartcarlife.recepiton.material.merchant.saveOrUpdate` data.method = `dj.api.smartcarlife.recepiton.material.merchant.saveOrUpdate`
return request(data, "post", [], "", "/rop-dj-car-boutique/router") return request(data, "post", [], "", "/rop-dj-car-boutique/router")
} }
// 保存更新门店接待素材 // 保存更新门店接待素材
export function findDictData(data) { export function findDictData (data) {
data.method = `merchants.api.menu.findDictData` data.method = `merchants.api.menu.findDictData`
return request(data, "post") return request(data, "post")
} }
// 保存更新门店接待素材 // 保存更新门店接待素材
export function deleteDictData(data) { export function deleteDictData (data) {
data.method = `merchants.api.menu.deleteDictData` data.method = `merchants.api.menu.deleteDictData`
return request(data, "post") return request(data, "post")
} }
// 保存更新门店接待素材 // 保存更新门店接待素材
export function updateDictData(data) { export function updateDictData (data) {
data.method = `merchants.api.menu.updateDictData` data.method = `merchants.api.menu.updateDictData`
return request(data, "post") return request(data, "post")
} }
// 保存更新门店接待素材 // 保存更新门店接待素材
export function saveDictData(data) { export function saveDictData (data) {
data.method = `merchants.api.menu.saveDictData` data.method = `merchants.api.menu.saveDictData`
return request(data, "post") return request(data, "post")
} }
/**客户标签列表 */
export function getCustomerLabelPage (data) {
data.method = `dj.api.material.customer.label.page`
return request(data, "post")
}
/**新增客户标签 */
export function addCustomerLabel (data) {
data.method = `dj.api.material.customer.label.add`
return request(data, "post")
}
/**修改客户标签 */
export function updateCustomerLabel (data) {
data.method = `dj.api.material.customer.label.update`
return request(data, "post")
}
/**分页查询客户档案信息(管理后台) */
export function getCustomerFilePage (data) {
data.method = `dj.api.mindworkplate.customervisit.customerInfoListPage`
return request(data, "post")
}
/**客户档案信息(管理后台)导出 */
export function exportCustomerFile (data) {
data.method = `dj.api.mindworkplate.customervisit.customerInfoListExport`
return request(data, "post")
}
/** 客户档案统计信息(管理后台) */
export function getCustomerFileStatic (data) {
data.method = `dj.api.mindworkplate.customervisit.customerInfoListStatic`
return request(data, "post")
}
/** 客户档案话术浏览记录 */
export function getCustomerVisitScriptsListPage (data) {
data.method = `dj.api.mindworkplate.customervisit.CustomerVisitScriptsListPage`
return request(data, "post")
}
/**客户档案标签 */
export function getCustomerInfoDetail (data) {
data.method = `dj.api.mindworkplate.customervisit.getCustomerInfoDetail`
return request(data, "post")
}
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.api.smartcarlife."
// 查询员工预警列表
export function staffWarningMsgListWithPage(data) {
data.method = `${path}warningmsg.staffWarningMsgListWithPage`
return request(data, RequestMethods.POST)
}
// 预警明细
export function warningMsgDetailListWithPage(data) {
data.method = `${path}warningmsg.warningMsgDetailListWithPage`
return request(data, RequestMethods.POST)
}
// 查询枚举 Type 1.预警类型 2.预警事项
export function findAllData(data) {
data.method = `${path}warningmsg.findAllData`
return request(data, RequestMethods.POST)
}
// 查询相关警情的所有督导或销售 1.督导 2.销售
export function findAllPersonRelations(data) {
data.method = `${path}warningmsg.findAllPersonRelations`
return request(data, RequestMethods.POST)
}
// 根据预警id查询预警的跟进信息
export function findByMsgId(data) {
data.method = `${path}warningmsg.findByMsgId`
return request(data, RequestMethods.POST)
}
// 保存跟进记录
export function saveFollowRecord(data) {
data.method = `${path}warningmsg.saveFollowRecord`
return request(data, RequestMethods.POST)
}
// 导出预警明细
export function warningMsgDetailListWithPageExport(data) {
data.method = `${path}warningmsg.warningMsgDetailListWithPageExport`
return request(data, RequestMethods.POST)
}
// 查询门店预警列表
export function merchantWarningMsgListWithPage(data) {
data.method = `${path}warningmsg.merchantWarningMsgListWithPage`
return request(data, RequestMethods.POST)
}
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: AI对练相关接口 * @Description: AI对练相关接口
* @Author: huyue * @Author: huyue
* @Date: 2024-04-19 11:02:02 * @Date: 2024-04-19 11:02:02
* @LastEditors: 王志慧 wangzh@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-07-20 10:42:14 * @LastEditTime: 2024-10-25 15:45:25
*/ */
import request from "./request" import request from "./request"
const path = "dj.api.smartcarlife.ai.sparring." const path = "dj.api.smartcarlife.ai.sparring."
...@@ -73,7 +73,16 @@ export function staffRecordPage(data) { ...@@ -73,7 +73,16 @@ export function staffRecordPage(data) {
data.method = `${path}staff.record.page` data.method = `${path}staff.record.page`
return request(data) return request(data)
} }
// 查询对练详情列表
export function staffBehaviorPage(data) {
data.method = `dj.api.carboutique.ai.sparring.staff.behavior.page`
return request(data)
}
// 查询对练详情列表
export function staffBehaviorExport(data) {
data.method = `dj.api.smartcarlife.ai.sparring.staff.behavior.list.export`
return request(data)
}
// 更新任务提示词状态 // 更新任务提示词状态
export function updateTaskPromptStatus(data) { export function updateTaskPromptStatus(data) {
data.method = `${path}task.updatePrompt` data.method = `${path}task.updatePrompt`
......
...@@ -8,6 +8,16 @@ export function getReclistWithPage(data) { ...@@ -8,6 +8,16 @@ export function getReclistWithPage(data) {
data.method = `${path}badge.employeeBadgeReclistWithPage` data.method = `${path}badge.employeeBadgeReclistWithPage`
return request(data, "post") return request(data, "post")
} }
// 质检统计
export function receptionStaffStatic(data) {
data.method = `${path}badge.receptionStaffStatic`
return request(data, "post")
}
// 安心包明细
export function findAxbByBatchId(data) {
data.method = `${path2}inspection.defence.findAxbByBatchId`
return request(data, "post")
}
// 分页查询接待批次列表 // 分页查询接待批次列表
export function conversationPage(data) { export function conversationPage(data) {
......
...@@ -927,3 +927,31 @@ export const sendStatusList = [ ...@@ -927,3 +927,31 @@ export const sendStatusList = [
{ confId: 2, confValue: "待发送" }, { confId: 2, confValue: "待发送" },
{ confId: 3, confValue: "已发送" } { confId: 3, confValue: "已发送" }
] ]
// 预警管理 所属业务
export const businessOpt = [
{ confId: 2, confValue: "轻改" },
{ confId: 3, confValue: "权益" },
{ confId: 4, confValue: "延保" }
]
// 预警管理 优先级
export const priorityOpt = [
{ confId: 1, confValue: "1" },
{ confId: 2, confValue: "2" },
{ confId: 3, confValue: "3" }
]
// 预警管理 预警阶段
export const warnStageyOpt = [
{ confId: 1, confValue: "第一阶段" },
{ confId: 2, confValue: "第二阶段" }
]
// 预警管理 状态
export const statusOpt = [
{ confId: 1, confValue: "待处理" },
{ confId: 2, confValue: "预约处理" },
{ confId: 3, confValue: "已完成" },
{ confId: 0, confValue: "无需处理" }
]
<!-- 表格+分页 --> <!-- 表格+分页 -->
<template> <template>
<div class="d2-table"> <div class="d2-table">
<el-table :ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'" <el-table
:ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:data="getListApi ? data : tableData" :data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''" :row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading" v-loading="loading"
...@@ -11,21 +12,29 @@ ...@@ -11,21 +12,29 @@
@selection-change="handleSelect" @selection-change="handleSelect"
:tree-props="{ children: 'upgradeGoodsList' }" :tree-props="{ children: 'upgradeGoodsList' }"
:span-method="arraySpanMethod" :span-method="arraySpanMethod"
v-bind="$attrs"> v-bind="$attrs"
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName" >
<el-table-column
v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type="selection" type="selection"
align="center" align="center"
:selectable="selectableFn" :selectable="selectableFn"
width="55" /> width="55"
<el-table-column v-if="tableParams.singleSelectUniqueKey" />
<el-table-column
v-if="tableParams.singleSelectUniqueKey"
align="center" align="center"
width="55"> width="55"
>
<template slot-scope="scope"> <template slot-scope="scope">
<slot name="single-button" <slot
:scope="scope.row" /> name="single-button"
:scope="scope.row"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="hasNum" <el-table-column
v-if="hasNum"
align="center" align="center"
width="60px" width="60px"
label="序号" label="序号"
...@@ -39,8 +48,10 @@ ...@@ -39,8 +48,10 @@
1) * 1) *
(pagination.pageSize ? pagination.pageSize : page.pageSize) + (pagination.pageSize ? pagination.pageSize : page.pageSize) +
1 1
" /> "
<el-table-column v-for="(item, index) in tableParams.tableColumns" />
<el-table-column
v-for="(item, index) in tableParams.tableColumns"
:key="index" :key="index"
:label="item.label" :label="item.label"
:prop="item.prop" :prop="item.prop"
...@@ -49,22 +60,27 @@ ...@@ -49,22 +60,27 @@
:align="item.align || 'center'" :align="item.align || 'center'"
:sortable="item.sortable" :sortable="item.sortable"
:render-header="item.renderHeader" :render-header="item.renderHeader"
:show-overflow-tooltip="item.showOverFlow"> :show-overflow-tooltip="item.showOverFlow"
>
<template slot="header"> <template slot="header">
<span>{{ item.label }}</span> <span>{{ item.label }}</span>
<table-head-search v-if="item.optionConfig" <table-head-search
v-if="item.optionConfig"
:search-form="headSearchForm" :search-form="headSearchForm"
:option-config="item.optionConfig" :option-config="item.optionConfig"
:base-data="baseData" :base-data="baseData"
@handleTableHeadChange="handleTableHeadChange" /> @handleTableHeadChange="handleTableHeadChange"
/>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<slot v-if="item.addHtml" <slot
v-if="item.addHtml"
:name="item.addHtml" :name="item.addHtml"
:scope="scope.row" :scope="scope.row"
:index="scope.$index" :index="scope.$index"
:prop="item.prop" :prop="item.prop"
:width="item.width" /> :width="item.width"
/>
<template v-else-if="item.type == 'ownSerialNum'"> <template v-else-if="item.type == 'ownSerialNum'">
<span>{{ <span>{{
scope.row[item.prop] >= 0 scope.row[item.prop] >= 0
...@@ -81,16 +97,22 @@ ...@@ -81,16 +97,22 @@
}}</span> }}</span>
</template> </template>
<template v-else-if="item.tagLabel"> <template v-else-if="item.tagLabel">
<el-tag v-if="!item.tagName" <el-tag
v-if="!item.tagName"
:type="tableParams.tag.type[scope.row[item.prop]]" :type="tableParams.tag.type[scope.row[item.prop]]"
v-text="tableParams.tag.label[scope.row[item.prop]]" /> v-text="tableParams.tag.label[scope.row[item.prop]]"
<el-tag v-else />
<el-tag
v-else
:type="tableParams[item.tagName].type[scope.row[item.prop]]" :type="tableParams[item.tagName].type[scope.row[item.prop]]"
v-text="tableParams[item.tagName].label[scope.row[item.prop]]" /> v-text="tableParams[item.tagName].label[scope.row[item.prop]]"
/>
</template> </template>
<template v-else-if="item.formatter"> <template v-else-if="item.formatter">
<span v-if="item.html" <span
v-html="item.formatter(scope.row)" /> v-if="item.html"
v-html="item.formatter(scope.row)"
/>
<template v-if="!item.html"> <template v-if="!item.html">
<span :class="item.className ? item.className(scope.row) : ''" /> <span :class="item.className ? item.className(scope.row) : ''" />
<span v-text="item.formatter(scope.row)" /> <span v-text="item.formatter(scope.row)" />
...@@ -122,30 +144,41 @@ ...@@ -122,30 +144,41 @@
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="tableParams.tableOption" <el-table-column
v-if="tableParams.tableOption"
label="操作" label="操作"
fixed="right" fixed="right"
:align="tableParams.tableOption.align || 'center'" :align="tableParams.tableOption.align || 'center'"
:width="tableParams.tableOption.width || 'auto'"> :width="tableParams.tableOption.width || 'auto'"
>
<template slot-scope="scope"> <template slot-scope="scope">
<slot name="auth-button" <slot
name="auth-button"
:scope="scope.row" :scope="scope.row"
:index="scope.$index" /> :index="scope.$index"
<slot name="auth-button-other" />
<slot
name="auth-button-other"
:scope="scope.row" :scope="scope.row"
:index="scope.$index" /> :index="scope.$index"
/>
</template> </template>
</el-table-column> </el-table-column>
<div slot="empty" <div
class="emptyBg"> slot="empty"
<img class="noDataImg" class="emptyBg"
>
<img
class="noDataImg"
:src="noDataImg" :src="noDataImg"
v-if="noDataImg" /> v-if="noDataImg"
/>
{{ noDataText }} {{ noDataText }}
</div> </div>
</el-table> </el-table>
<el-pagination v-if="hasPage" <el-pagination
v-if="hasPage"
background background
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -153,7 +186,8 @@ ...@@ -153,7 +186,8 @@
:page-sizes="[10, 20, 30, 40]" :page-sizes="[10, 20, 30, 40]"
:page-size="page.pageSize" :page-size="page.pageSize"
:total="getListApi ? total : tableTotal" :total="getListApi ? total : tableTotal"
:layout="layout" /> :layout="layout"
/>
</div> </div>
</template> </template>
...@@ -161,7 +195,7 @@ ...@@ -161,7 +195,7 @@
import TableHeadSearch from "./TableHeadSearch" import TableHeadSearch from "./TableHeadSearch"
export default { export default {
name: "D2Table", name: "D2Table",
data() { data () {
return { return {
loading: false, loading: false,
data: [], data: [],
...@@ -318,7 +352,7 @@ export default { ...@@ -318,7 +352,7 @@ export default {
} }
}, },
mounted() { mounted () {
const btn = document.getElementById(this.tableParams.btnId) const btn = document.getElementById(this.tableParams.btnId)
btn && btn.addEventListener("click", this.refreshEmit) btn && btn.addEventListener("click", this.refreshEmit)
this.getListApi && this.refreshTable() this.getListApi && this.refreshTable()
...@@ -326,32 +360,32 @@ export default { ...@@ -326,32 +360,32 @@ export default {
methods: { methods: {
// 排序 // 排序
sortChange({ column, prop, order }) { sortChange ({ column, prop, order }) {
this.sortColum = order ? prop : "" this.sortColum = order ? prop : ""
this.sort = order this.sort = order
this.refreshTable(true, true) this.refreshTable(true, true)
}, },
// 多选 // 多选
handleSelect(val) { handleSelect (val) {
this.mutiSelectArr[this.tableParams.mutiSelectName] = val this.mutiSelectArr[this.tableParams.mutiSelectName] = val
// 多选 // 多选
this.$emit("selectionTable", val) this.$emit("selectionTable", val)
}, },
// 清空多选 // 清空多选
clearMutiSelect() { clearMutiSelect () {
this.mutiSelectArr[this.tableParams.mutiSelectName] = [] this.mutiSelectArr[this.tableParams.mutiSelectName] = []
this.$refs[this.tableParams.mutiSelectName + "MutiTable"].clearSelection() this.$refs[this.tableParams.mutiSelectName + "MutiTable"].clearSelection()
}, },
// 发布事件,以期查询条件改变后,页面图表需要刷新 // 发布事件,以期查询条件改变后,页面图表需要刷新
refreshEmit() { refreshEmit () {
this.$emit("searchChange") this.$emit("searchChange")
this.refreshTable(true, true) this.refreshTable(true, true)
}, },
refreshTable(clearMuti = false, resetCurrentPage = false) { refreshTable (clearMuti = false, resetCurrentPage = false) {
this.beforeSearchFn().then((res) => { this.beforeSearchFn().then((res) => {
// console.log(res) // console.log(res)
// 清空多选 // 清空多选
...@@ -444,12 +478,12 @@ export default { ...@@ -444,12 +478,12 @@ export default {
}, },
// 表头搜索项-改变 // 表头搜索项-改变
handleTableHeadChange(obj) { handleTableHeadChange (obj) {
this.$emit("handleTableHeadChange", obj) this.$emit("handleTableHeadChange", obj)
}, },
// 每页条数 // 每页条数
handleSizeChange(value) { handleSizeChange (value) {
this.page.pageSize = value this.page.pageSize = value
this.getListApi this.getListApi
? this.refreshTable(false) ? this.refreshTable(false)
...@@ -457,18 +491,18 @@ export default { ...@@ -457,18 +491,18 @@ export default {
}, },
// 页码 // 页码
handleCurrentChange(value) { handleCurrentChange (value) {
this.page.currentPage = value this.page.currentPage = value
this.getListApi this.getListApi
? this.refreshTable(false) ? this.refreshTable(false)
: this.$emit("refreshTable", this.page) : this.$emit("refreshTable", this.page)
}, },
// 重置请求 // 重置请求
resetRefreshTable() { resetRefreshTable () {
this.refreshTable_noApi() this.refreshTable_noApi()
this.refreshTable() this.refreshTable()
}, },
refreshTable_noApi() { refreshTable_noApi () {
this.page = { this.page = {
pageSize: 10, pageSize: 10,
currentPage: 1 currentPage: 1
......
// 创建 el-menu-item // 创建 el-menu-item
export function elMenuItem(createElement, menu) { export function elMenuItem(createElement, menu) {
return createElement('el-menu-item', { props: { index: menu.path } }, [ return createElement("el-menu-item", { props: { index: menu.path } }, [
...(menu.icon ...(menu.icon
? [createElement('i', { attrs: { class: `el-icon-${menu.icon}` } })] ? [createElement("i", { attrs: { class: `el-icon-${menu.icon}` } })]
: []), : []),
...((menu.icon === undefined) & !menu.iconSvg ...(menu.icon === undefined && !menu.iconSvg && menu.title == "总览"
? [ ? [
// createElement('img', { attrs: { src: './menuIcon/' + menu.path.slice(1) + '.png' } }) // createElement('img', { attrs: { src: './menuIcon/' + menu.path.slice(1) + '.png' } })
// public 文件需要使用绝对路径引入 // public 文件需要使用绝对路径引入
createElement('img', { createElement("img", {
attrs: { attrs: {
src: src:
`${process.env.VUE_APP_PUBLIC_PATH}menuIcon/` + `${process.env.VUE_APP_PUBLIC_PATH}menuIcon/` +
menu.path.slice(1) + menu.path.slice(1) +
'.png' ".png",
width: "22px",
height: "20px"
} }
}) })
] ]
: []), : []),
...(menu.iconSvg ...(menu.iconSvg
? [createElement('d2-icon-svg', { props: { name: menu.iconSvg } })] ? [createElement("d2-icon-svg", { props: { name: menu.iconSvg } })]
: []), : []),
createElement('span', { slot: 'title' }, menu.title || '未命名菜单') createElement("span", { slot: "title" }, menu.title || "未命名菜单")
]) ])
} }
// 创建 el-submenu // 创建 el-submenu
export function elSubmenu(createElement, menu) { export function elSubmenu(createElement, menu) {
return createElement('el-submenu', { props: { index: menu.path } }, [ return createElement("el-submenu", { props: { index: menu.path } }, [
...(menu.icon ...(menu.icon
? [ ? [
createElement('i', { createElement("i", {
slot: 'title', slot: "title",
attrs: { class: `el-icon-${menu.icon}` } attrs: { class: `el-icon-${menu.icon}` }
}) })
] ]
...@@ -40,29 +42,31 @@ export function elSubmenu(createElement, menu) { ...@@ -40,29 +42,31 @@ export function elSubmenu(createElement, menu) {
? [ ? [
// createElement('img', { slot: 'title', attrs: { src: './menuIcon/' + menu.path.slice(1) + '.png' } }) // createElement('img', { slot: 'title', attrs: { src: './menuIcon/' + menu.path.slice(1) + '.png' } })
// public 文件需要使用绝对路径引入 // public 文件需要使用绝对路径引入
createElement('img', { createElement("img", {
slot: 'title', slot: "title",
attrs: { attrs: {
src: src:
`${process.env.VUE_APP_PUBLIC_PATH}menuIcon/` + `${process.env.VUE_APP_PUBLIC_PATH}menuIcon/` +
menu.path.slice(1) + menu.path.slice(1) +
'.png' ".png",
width: "22px",
height: "20px"
} }
}) })
] ]
: []), : []),
...(menu.iconSvg ...(menu.iconSvg
? [ ? [
createElement('d2-icon-svg', { createElement("d2-icon-svg", {
slot: 'title', slot: "title",
props: { name: menu.iconSvg } props: { name: menu.iconSvg }
}) })
] ]
: []), : []),
createElement('span', { slot: 'title' }, menu.title || '未命名菜单'), createElement("span", { slot: "title" }, menu.title || "未命名菜单"),
...menu.children.map((child, childIndex) => ...menu.children.map((child, childIndex) =>
child.sideHidden child.sideHidden
? '' ? ""
: (child.children === undefined ? elMenuItem : elSubmenu).call( : (child.children === undefined ? elMenuItem : elSubmenu).call(
this, this,
createElement, createElement,
......
import { mapState } from 'vuex' import { mapState } from "vuex"
import menuMixin from '../mixin/menu' import menuMixin from "../mixin/menu"
import { elMenuItem, elSubmenu } from '../libs/util.menu' import { elMenuItem, elSubmenu } from "../libs/util.menu"
export default { export default {
name: 'd2-layout-header-aside-menu-header', name: "d2-layout-header-aside-menu-header",
mixins: [ mixins: [menuMixin],
menuMixin
],
render(createElement) { render(createElement) {
return createElement('div', { return createElement(
attrs: { flex: 'cross:center' }, "div",
class: { 'd2-theme-header-menu': true, 'is-scrollable': this.isScroll }, {
ref: 'page' attrs: { flex: "cross:center" },
}, [ class: { "d2-theme-header-menu": true, "is-scrollable": this.isScroll },
createElement('div', { ref: "page"
attrs: { class: 'd2-theme-header-menu__content', flex: '', 'flex-box': '1' }, },
ref: 'content' [
}, [ createElement(
createElement('div', { "div",
attrs: { class: 'd2-theme-header-menu__scroll', 'flex-box': '0' }, {
attrs: {
class: "d2-theme-header-menu__content",
flex: "",
"flex-box": "1"
},
ref: "content"
},
[
createElement(
"div",
{
attrs: {
class: "d2-theme-header-menu__scroll",
"flex-box": "0"
},
style: { transform: `translateX(${this.currentTranslateX}px)` }, style: { transform: `translateX(${this.currentTranslateX}px)` },
ref: 'scroll' ref: "scroll"
}, [ },
createElement('el-menu', { [
props: { mode: 'horizontal', defaultActive: this.active }, createElement(
"el-menu",
{
props: { mode: "horizontal", defaultActive: this.active },
on: { select: this.handleMenuSelect } on: { select: this.handleMenuSelect }
}, this.header.map(menu => (menu.children === undefined ? elMenuItem : elSubmenu).call(this, createElement, menu))) },
]) this.header.map((menu) =>
]), (menu.children === undefined || menu.title != "总览"
...this.isScroll ? elMenuItem
: elSubmenu
).call(this, createElement, menu)
)
)
]
)
]
),
...(this.isScroll
? [ ? [
createElement('div', { createElement(
attrs: { class: 'd2-theme-header-menu__prev', flex: 'main:center cross:center', 'flex-box': '0' }, "div",
on: { click: () => this.scroll('left') } {
}, [ attrs: {
createElement('i', { attrs: { class: 'el-icon-arrow-left' } }) class: "d2-theme-header-menu__prev",
]), flex: "main:center cross:center",
createElement('div', { "flex-box": "0"
attrs: { class: 'd2-theme-header-menu__next', flex: 'main:center cross:center', 'flex-box': '0' }, },
on: { click: () => this.scroll('right') } on: { click: () => this.scroll("left") }
}, [ },
createElement('i', { attrs: { class: 'el-icon-arrow-right' } }) [createElement("i", { attrs: { class: "el-icon-arrow-left" } })]
]) ),
createElement(
"div",
{
attrs: {
class: "d2-theme-header-menu__next",
flex: "main:center cross:center",
"flex-box": "0"
},
on: { click: () => this.scroll("right") }
},
[
createElement("i", {
attrs: { class: "el-icon-arrow-right" }
})
]
)
]
: [])
] ]
: [] )
])
}, },
computed: { computed: {
...mapState('d2admin/menu', [ ...mapState("d2admin/menu", ["header"])
'header'
])
}, },
data() { data() {
return { return {
active: '', active: "",
isScroll: false, isScroll: false,
scrollWidth: 0, scrollWidth: 0,
contentWidth: 0, contentWidth: 0,
...@@ -62,7 +102,7 @@ export default { ...@@ -62,7 +102,7 @@ export default {
} }
}, },
watch: { watch: {
'$route.matched': { "$route.matched": {
handler(val) { handler(val) {
this.active = val[val.length - 1].path this.active = val[val.length - 1].path
}, },
...@@ -71,12 +111,15 @@ export default { ...@@ -71,12 +111,15 @@ export default {
}, },
methods: { methods: {
scroll(direction) { scroll(direction) {
if (direction === 'left') { if (direction === "left") {
// 向右滚动 // 向右滚动
this.currentTranslateX = 0 this.currentTranslateX = 0
} else { } else {
// 向左滚动 // 向左滚动
if (this.contentWidth * 2 - this.currentTranslateX <= this.scrollWidth) { if (
this.contentWidth * 2 - this.currentTranslateX <=
this.scrollWidth
) {
this.currentTranslateX -= this.contentWidth this.currentTranslateX -= this.contentWidth
} else { } else {
this.currentTranslateX = this.contentWidth - this.scrollWidth this.currentTranslateX = this.contentWidth - this.scrollWidth
...@@ -121,14 +164,14 @@ export default { ...@@ -121,14 +164,14 @@ export default {
mounted() { mounted() {
// 初始化判断 // 初始化判断
// 默认判断父元素和子元素的大小,以确定初始情况是否显示滚动 // 默认判断父元素和子元素的大小,以确定初始情况是否显示滚动
window.addEventListener('load', this.checkScroll) window.addEventListener("load", this.checkScroll)
// 全局窗口变化监听,判断父元素和子元素的大小,从而控制isScroll的开关 // 全局窗口变化监听,判断父元素和子元素的大小,从而控制isScroll的开关
this.throttledCheckScroll = _.throttle(this.checkScroll, 300) this.throttledCheckScroll = _.throttle(this.checkScroll, 300)
window.addEventListener('resize', this.throttledCheckScroll) window.addEventListener("resize", this.throttledCheckScroll)
}, },
beforeDestroy() { beforeDestroy() {
// 取消监听 // 取消监听
window.removeEventListener('resize', this.throttledCheckScroll) window.removeEventListener("resize", this.throttledCheckScroll)
window.removeEventListener('load', this.checkScroll) window.removeEventListener("load", this.checkScroll)
} }
} }
import { mapState } from 'vuex' import { mapState } from "vuex"
import menuMixin from '../mixin/menu' import menuMixin from "../mixin/menu"
import { elMenuItem, elSubmenu } from '../libs/util.menu' import { elMenuItem, elSubmenu } from "../libs/util.menu"
import BScroll from 'better-scroll' import BScroll from "better-scroll"
export default { export default {
name: 'd2-layout-header-aside-menu-side', name: "d2-layout-header-aside-menu-side",
mixins: [ mixins: [menuMixin],
menuMixin
],
render(createElement) { render(createElement) {
return createElement('div', { attrs: { class: 'd2-layout-header-aside-menu-side' } }, [ return createElement(
createElement('el-menu', { "div",
props: { collapse: this.asideCollapse, uniqueOpened: true, defaultActive: this.active }, { attrs: { class: "d2-layout-header-aside-menu-side" } },
ref: 'menu', [
createElement(
"el-menu",
{
props: {
collapse: this.asideCollapse,
uniqueOpened: true,
defaultActive: this.active
},
ref: "menu",
on: { select: this.handleMenuSelect } on: { select: this.handleMenuSelect }
}, this.aside.map(menu => ((menu.children === undefined || menu.children.every(i => i.sideHidden === true)) ? elMenuItem : elSubmenu).call(this, createElement, menu))), },
...this.aside.length === 0 && !this.asideCollapse this.aside.map((menu) =>
(menu.children === undefined ||
menu.children.every((i) => i.sideHidden === true)
? elMenuItem
: elSubmenu
).call(this, createElement, menu)
)
),
...(this.aside.length === 0 && !this.asideCollapse
? [ ? [
createElement('div', { attrs: { class: 'd2-layout-header-aside-menu-empty', flex: 'dir:top main:center cross:center' } }, [ createElement(
createElement('d2-icon', { props: { name: 'inbox' } }), "div",
createElement('span', {}, '没有侧栏菜单') {
]) attrs: {
class: "d2-layout-header-aside-menu-empty",
flex: "dir:top main:center cross:center"
}
},
[
createElement("d2-icon", { props: { name: "inbox" } }),
createElement("span", {}, "没有侧栏菜单")
]
)
]
: [])
] ]
: [] )
])
}, },
data() { data() {
return { return {
active: '', active: "",
asideHeight: 300, asideHeight: 300,
BS: null BS: null
} }
}, },
computed: { computed: {
...mapState('d2admin/menu', [ ...mapState("d2admin/menu", ["aside", "asideCollapse"])
'aside',
'asideCollapse'
])
}, },
watch: { watch: {
// 折叠和展开菜单的时候销毁 better scroll // 折叠和展开菜单的时候销毁 better scroll
...@@ -47,9 +69,11 @@ export default { ...@@ -47,9 +69,11 @@ export default {
}, 500) }, 500)
}, },
// 监听路由 控制侧边栏激活状态 // 监听路由 控制侧边栏激活状态
'$route.matched': { "$route.matched": {
handler(val) { handler(val) {
this.active = val[val.length - 1].meta.hasOwnProperty('activePath') ? val[val.length - 1].meta.activePath : val[val.length - 1].path this.active = val[val.length - 1].meta.hasOwnProperty("activePath")
? val[val.length - 1].meta.activePath
: val[val.length - 1].path
}, },
immediate: true immediate: true
} }
......
...@@ -796,7 +796,7 @@ export const routerName = { ...@@ -796,7 +796,7 @@ export const routerName = {
{ {
authId: "9061914", authId: "9061914",
parentId: "90619", parentId: "90619",
label: "标记退款", label: "阳光激励配置",
handle: "markRefundHandle" handle: "markRefundHandle"
}, },
......
...@@ -15,7 +15,9 @@ export const routerName = { ...@@ -15,7 +15,9 @@ export const routerName = {
title: "总览", title: "总览",
authId: "907", authId: "907",
parentId: "1", parentId: "1",
cache: false icon: "s-home",
cache: false,
sideHidden: false
}, },
auth: [ auth: [
{ {
...@@ -69,7 +71,7 @@ export const routerName = { ...@@ -69,7 +71,7 @@ export const routerName = {
category: "Button", category: "Button",
handle: "handleOutputImport", handle: "handleOutputImport",
label: "导入" label: "导入"
}, }
], ],
component: _import("index") component: _import("index")
}, },
......
...@@ -306,5 +306,41 @@ export const routerName = { ...@@ -306,5 +306,41 @@ export const routerName = {
}, },
auth: [], auth: [],
component: _import("contentManager/packageConfig/edit") component: _import("contentManager/packageConfig/edit")
},
91315: {
path: "/customerTags",
name: "customerTags",
meta: {
title: "客户标签",
authId: "91315",
parentId: "913",
cache: false
},
auth: [],
component: _import("contentManager/customerTags/index")
},
91317: {
path: "/customerFile",
name: "customerFile",
meta: {
title: "客户档案",
authId: "91317",
parentId: "913",
cache: false
},
auth: [],
component: _import("contentManager/customerFile/index")
},
9131701:{
path: "/customerFileDetails",
name: "customerFileDetails",
meta: {
title: "话术管理",
authId: "9131701",
parentId: "91317",
cache: false
},
auth: [],
component: _import("contentManager/customerFile/customerFileDetails")
} }
} }
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
915: {
path: "/earlyWarningManager",
name: "earlyWarningManager",
meta: {
title: "预警管理",
authId: "915",
parentId: "1",
cache: false
}
},
91501: {
path: "/staffWarn",
name: "staffWarn",
meta: {
title: "员工预警管理",
authId: "91501",
parentId: "915",
cache: false
},
auth: [
{
authId: "9150101",
parentId: "91501",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9150102",
parentId: "91501",
label: "查看",
handle: "handleDetail"
},
{
authId: "9150103",
parentId: "91501",
label: "处理",
handle: "handleDeal"
}
],
component: _import("earlyWarningManager/staff/indexControl")
},
91502: {
path: "/storeWarn",
name: "storeWarn",
meta: {
title: "门店预警管理",
authId: "91502",
parentId: "915",
cache: false
},
auth: [
{
authId: "9150201",
parentId: "91502",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport"
},
{
authId: "9150202",
parentId: "91502",
label: "查看",
handle: "handleDetail"
},
{
authId: "9150203",
parentId: "91502",
label: "处理",
handle: "handleDeal"
}
],
component: _import("earlyWarningManager/store/indexControl")
}
}
...@@ -28,7 +28,8 @@ export const home = { ...@@ -28,7 +28,8 @@ export const home = {
title: "总览", title: "总览",
authId: "907", authId: "907",
parentId: "1", parentId: "1",
cache: false cache: false,
sideHidden: false
}, },
auth: [ auth: [
{ {
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-08-29 18:04:06
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-09-02 16:12:54
* @FilePath: \dj-car-life-system\src\views\contentManager\components\AddDrawer\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<el-drawer <el-drawer
:title="form.id ? '编辑产品词条' : '新增产品词条'" :title="form.id ? '编辑产品词条' : '新增产品词条'"
...@@ -118,7 +110,6 @@ ...@@ -118,7 +110,6 @@
v-if="form.pictureList && form.pictureList.length" v-if="form.pictureList && form.pictureList.length"
> >
图片按照以上排序进行展示,可拖动调整排序 图片按照以上排序进行展示,可拖动调整排序
<span class="tip-btn" @click="showEffect()">查看效果</span>
</p> </p>
<p class="photo-top-tips" v-else> <p class="photo-top-tips" v-else>
推荐尺寸:1173*768,单个文件不超过10M,最多上传9张 推荐尺寸:1173*768,单个文件不超过10M,最多上传9张
...@@ -156,6 +147,12 @@ export default { ...@@ -156,6 +147,12 @@ export default {
}, },
mounted() { mounted() {
this.init() this.init()
setTimeout(() => {
console.log(this.form)
if (!this.form.pictureList) {
this.form.pictureList = []
}
}, 1000)
}, },
data() { data() {
return { return {
...@@ -302,6 +299,7 @@ export default { ...@@ -302,6 +299,7 @@ export default {
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
margin-bottom: 0px; margin-bottom: 0px;
padding-bottom: 20px; padding-bottom: 20px;
color: #333333;
} }
.drawer__content { .drawer__content {
padding: 20px; padding: 20px;
...@@ -370,4 +368,7 @@ export default { ...@@ -370,4 +368,7 @@ export default {
margin-left: 20px; margin-left: 20px;
} }
} }
.photo-top-tips {
color: #999999;
}
</style> </style>
...@@ -278,12 +278,12 @@ export default { ...@@ -278,12 +278,12 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "标题", label: "标题",
prop: "title" prop: "title",
minWidth:120
}, },
{ {
label: "类型", label: "类型",
prop: "type", prop: "type",
width: "100px",
formatter: (cellValue) => { formatter: (cellValue) => {
return { return {
0: "图片", 0: "图片",
...@@ -322,7 +322,7 @@ export default { ...@@ -322,7 +322,7 @@ export default {
{ {
label: "客户标签", label: "客户标签",
prop: "customerLabelInfoList", prop: "customerLabelInfoList",
width: "120px", 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(",") : '-'
} }
...@@ -346,14 +346,12 @@ export default { ...@@ -346,14 +346,12 @@ export default {
{ {
label: "可见门店", label: "可见门店",
prop: "showMerchant", prop: "showMerchant",
width: "120px",
type: "slot", type: "slot",
addHtml: "merchantSlot" addHtml: "merchantSlot"
}, },
{ {
label: "浏览次数", label: "浏览次数",
prop: "browseCount", prop: "browseCount",
width: "120px",
formatter: (cell) => { formatter: (cell) => {
return cell.browseCount || 0 return cell.browseCount || 0
} }
......
<template>
<d2-dialog
title="新增分类"
:is-visible="visible"
width="40%"
@closeDialog="handleClose"
@confirmDialog="handleConfirm"
>
<div
class="classify-box"
v-loading="loading"
>
<el-form
ref="classifyForm"
:model="dataForm"
:rules="formRules"
label-width="154px"
size="small"
>
<el-form-item
label="一级分类:"
prop="labelName"
>
<el-input
v-model="dataForm.labelName"
placeholder="请输入"
maxlength="30"
/>
</el-form-item>
<el-form-item
label="业务类型:"
prop="scene"
>
<el-select
v-model="dataForm.scene"
placeholder="请选择"
:disabled="currentItem.id"
>
<el-option
v-for="(subItem, subIndex) in businessTypeList"
:key="subIndex"
:value="subItem.id"
:label="subItem.label"
></el-option>
</el-select>
</el-form-item>
</el-form>
</div>
</d2-dialog>
</template>
<script type='text/ecmascript-6'>
import { deepClone } from '@/common/util'
import { SCENE_OPTIONS } from "../../constant"
import { addCustomerLabel, updateCustomerLabel } from '@api/contentManager'
export default {
name: 'classifyDialog',
props: {
visible: Boolean,
currentItem: Object
},
data () {
return {
loading: false,
businessTypeList: deepClone(SCENE_OPTIONS),
dataForm: {
labelName: '',
scene: ''
},
formRules: {
labelName: [{ required: true, message: '请输入一级分类', trigger: 'change' }],
scene: [{ required: true, message: '请选择业务类型', trigger: 'change' }],
}
}
},
watch: {
currentItem: {
immediate: true,
handler (newval) {
this.dataForm.scene = newval.scene
this.dataForm.labelName = newval.labelName
}
}
},
mounted () {
},
methods: {
handleClose () {
this.dataForm = this.$options.data.call(this).dataForm
this.$refs.classifyForm.resetFields()
this.loading = false
this.$emit('update:visible', false)
this.$emit('update:currentItem', {})
},
handleConfirm () {
this.$refs.classifyForm.validate(async (valid) => {
if (valid) {
try {
let targetApiName = addCustomerLabel,
params = {
level: 1,
...this.dataForm
},
{ id } = this.currentItem
if (id) {
targetApiName = updateCustomerLabel
params = {
id,
labelName: this.dataForm.labelName
}
}
this.loading = true
const res = await targetApiName(params)
console.log(res)
if (res) {
this.$message.success(id ? '修改成功' : '保存成功')
this.$emit('refresh')
this.handleClose()
this.loading = false
}
} catch (error) {
console.log(error)
this.loading = false
this.$message.error(error)
}
}
})
},
}
}
</script>
<style scoped lang='scss'>
.el-input,
.el-input--small ,
.el-select--small{
max-width: 215px;
}
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!