Commit 6cdcb696 by 前端

Merge branch 'SAAS+V4.54.0-0630' into 'develop'

上线合并

See merge request !458
2 parents d11f88b0 b08de625
Showing 101 changed files with 3295 additions and 481 deletions
......@@ -3524,27 +3524,6 @@
"whatwg-fetch": "^3.6.2"
},
"dependencies": {
"@vue/vue-loader-v15": {
"version": "npm:@vue/vue-loader-v15@15.11.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"acorn-walk": {
"version": "8.2.0",
"resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.2.0.tgz",
......@@ -3934,6 +3913,27 @@
"lodash": "^4.17.4"
}
},
"@vue/vue-loader-v15": {
"version": "npm:vue-loader@15.11.1",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
"dev": true,
"requires": {
"@vue/component-compiler-utils": "^3.1.0",
"hash-sum": "^1.0.2",
"loader-utils": "^1.1.0",
"vue-hot-reload-api": "^2.3.0",
"vue-style-loader": "^4.1.0"
},
"dependencies": {
"hash-sum": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
"dev": true
}
}
},
"@vue/vue2-jest": {
"version": "27.0.0",
"resolved": "https://registry.npmmirror.com/@vue/vue2-jest/-/vue2-jest-27.0.0.tgz",
......@@ -5927,7 +5927,7 @@
},
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-6.0.5.tgz",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"dev": true,
"requires": {
......@@ -7142,7 +7142,7 @@
},
"ignore": {
"version": "4.0.6",
"resolved": "https://registry.npmmirror.com/ignore/-/ignore-4.0.6.tgz",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
"dev": true
},
......@@ -8569,21 +8569,21 @@
}
},
"glsk-oss-jssdk": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/glsk-oss-jssdk/-/glsk-oss-jssdk-1.0.2.tgz",
"integrity": "sha512-oFbouNPVFrSv7ACunWdAlR1oJ4jpxMiK7ORGvd8BMpCeI6sMAJ6IneFKON5mp3GceOK6jxDtKub0UTKKx/W6lQ==",
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/glsk-oss-jssdk/-/glsk-oss-jssdk-1.0.3.tgz",
"integrity": "sha512-lgPWTSrT+y5NfuXBdvvfIovf+5c+3WD5GQRfhcWw77FX6IydG85EyQxjOVxu1R/HjacrALV6dJQJDw//SdnH7g==",
"requires": {
"ali-oss": "^6.23.0"
},
"dependencies": {
"address": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz",
"resolved": "https://registry.npmmirror.com/address/-/address-1.2.2.tgz",
"integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA=="
},
"ali-oss": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/ali-oss/-/ali-oss-6.23.0.tgz",
"resolved": "https://registry.npmmirror.com/ali-oss/-/ali-oss-6.23.0.tgz",
"integrity": "sha512-FipRmyd16Pr/tEey/YaaQ/24Pc3HEpLM9S1DRakEuXlSLXNIJnu1oJtHM53eVYpvW3dXapSjrip3xylZUTIZVQ==",
"requires": {
"address": "^1.2.2",
......@@ -8615,7 +8615,7 @@
},
"debug": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.1.tgz",
"integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
"requires": {
"ms": "^2.1.3"
......@@ -8623,12 +8623,12 @@
},
"mime": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",
"resolved": "https://registry.npmmirror.com/mime/-/mime-2.6.0.tgz",
"integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg=="
},
"ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
}
}
......@@ -8949,7 +8949,7 @@
"dependencies": {
"big.js": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/big.js/-/big.js-3.2.0.tgz",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz",
"integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q=="
},
"json5": {
......@@ -13603,7 +13603,7 @@
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true
},
......@@ -15124,7 +15124,7 @@
"dependencies": {
"pify": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/pify/-/pify-4.0.1.tgz",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true
},
......@@ -16790,7 +16790,7 @@
},
"type-fest": {
"version": "0.6.0",
"resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.6.0.tgz",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz",
"integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==",
"dev": true
},
......@@ -18101,7 +18101,7 @@
},
"yarn": {
"version": "1.22.19",
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.19.tgz",
"resolved": "https://registry.npmmirror.com/yarn/-/yarn-1.22.19.tgz",
"integrity": "sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ=="
},
"yorkie": {
......
......@@ -34,7 +34,7 @@
"file-saver": "^2.0.5",
"flex.css": "^1.1.7",
"fuse.js": "^3.4.4",
"glsk-oss-jssdk": "^1.0.1",
"glsk-oss-jssdk": "^1.0.3",
"glsx-common-sdk": "^0.3.0",
"hash.js": "^1.0.0",
"hotkeys-js": "^3.6.2",
......
import request from "./request"
const path = "dj.api.reconciliation.template."
// 对账模版列表
export function getTmplList(data) {
data.method = `${path}page`
return request(data)
}
// 删除模版记录
export function deleteTmpl(data) {
data.method = `${path}deleteById`
return request(data, "post")
}
// 根据ID查询详细信息
export function getTmplById(data) {
data.method = `${path}getById`
return request(data, "post")
}
// 新增或编辑对账模板
export function tmplAddOrEdit(data) {
data.method = `${path}addOrUpdate`
return request(data, "post")
}
// 对账模板元数据(流量方对账单,服务商对账单)
export function getMetaTmpl(data) {
data.method = `${path}metadata.groupByModule`
return request(data, "post")
}
// 对账单管理列表
export function getBillList(data) {
data.method = "dj.api.smartcarlife.reconciliationBill.page"
return request(data)
}
// 根据对账单ID查询待确认内容
export function getBillDetailList(data) {
data.method = "dj.api.smartcarlife.reconciliationBill.confirmContentPage"
return request(data)
}
// 系统分账-财务直接下载对账单(通过自定义字段,获取对账单字段和数据)
export function getBillTmplAdapter(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.generateUseRequestAdapter'
return request(data, "post")
}
// 对账单测算
export function billCompute(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.computeByJson'
return request(data, "post")
}
// 对账单测算-分页
export function billComputePage(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.computeByIncr.json'
return request(data, "post")
}
// 对账单编辑
export function editBill(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.updateByJson'
return request(data, "post")
}
// 对账单编辑-分页
export function editBillPage(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.updateByIncrByJson'
return request(data, "post")
}
export function billDetail(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.detail'
return request(data, "post")
}
// 对账单详情-分页
export function billDetailPage(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.detail.withOrderPage'
return request(data, "post")
}
//根据服务商商户号分页获取4S店列表
export function getShopList(data) {
data.method = 'dj.api.scenemerchantref.queryShopRefByPartnerShopPage'
return request(data)
}
// 对账单确认
export function billConfirm(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.confirm'
return request(data, "post")
}
// 对账单取消
export function billCancel(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.cancel'
return request(data, "post")
}
// 对账单待确认内容确认
export function billConfirmChange(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.confirmChange'
return request(data, "post")
}
// 对账单待取消内容确认
export function billCancelChange(data) {
data.method = 'dj.api.smartcarlife.reconciliationBill.cancelChange'
return request(data, "post")
}
import request from "./request"
const path = "dj.api."
const path2 = "dj.api.smartcarlife."
// 内容管理列表查询条件可见门店列表
export function getMerchantList(data) {
......@@ -217,7 +218,7 @@ export function addCustomerLabel(data) {
return request(data, "post")
}
/**修改客户标签 */
/** 修改客户标签 */
export function updateCustomerLabel(data) {
data.method = `dj.api.material.customer.label.update`
return request(data, "post")
......@@ -327,3 +328,105 @@ export function getMateralDetail(data) {
data.method = "dj.api.smartcarlife.reception.home.page.material.detail"
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")
}
/** 省市树 */
export function mapDistricts(data) {
data.method = `${path2}map.districts`
return request(data, "post")
}
// export function getCarbrandTree(data = {}) {
// data.method = `merchants.api.merchantCommon.getCarbrandTree`
// return request(data, "post")
// }
import request from "./request"
import RequestMethods from "./request.methods"
const path = "dj.smartcarlife.api.nbcb.transfer."
// 待付清单列表
export function transferPage(data) {
data.method = `${path}page`
return request(data, RequestMethods.POST)
}
// 批量重推付款单
export function batchRepush(data) {
data.method = `${path}batch.repush`
return request(data, RequestMethods.POST)
}
// 待付清单详情
export function transferDetail(data) {
data.method = `${path}detail`
return request(data, RequestMethods.POST)
}
// 待付清单财资付款状态列表
export function getStatusList(data) {
data.method = `${path}status.list`
return request(data, RequestMethods.POST)
}
......@@ -26,7 +26,7 @@ export function conversationPage(data) {
}
// 生产短链
export function getShortUrl(data) {
data.method = 'dj.api.smartcarlife.inspection.batch.file.short.url'
data.method = "dj.api.smartcarlife.inspection.batch.file.short.url"
return request(data, "post")
}
......@@ -332,194 +332,242 @@ export function getSalaryDetailApi(data) {
// 查询日报模板类型列表
export function getTemplateList(data = {}) {
data.method = 'dj.api.smartcarlife.digital.management.template.type.list'
return request(data, 'post')
data.method = "dj.api.smartcarlife.digital.management.template.type.list"
return request(data, "post")
}
// 督导
export function getStaffList(data) {
data.method = 'dj.api.smartcarlife.digital.management.template.staff.ref.list'
return request(data, 'post')
data.method = "dj.api.smartcarlife.digital.management.template.staff.ref.list"
return request(data, "post")
}
// 分页查询日报列表,表格数据
export function getRecordPage(data) {
data.method = 'dj.api.smartcarlife.digital.management.record.page'
return request(data, 'post')
data.method = "dj.api.smartcarlife.digital.management.record.page"
return request(data, "post")
}
// 查询模板详情, 表头数据
export function getTemplateDetail(data) {
data.method = 'dj.api.smartcarlife.digital.management.template.detail'
return request(data, 'post')
data.method = "dj.api.smartcarlife.digital.management.template.detail"
return request(data, "post")
}
// 查询日报统计总览
export function getSummary(data) {
data.method = 'dj.api.smartcarlife.digital.management.record.summary'
return request(data, 'post')
data.method = "dj.api.smartcarlife.digital.management.record.summary"
return request(data, "post")
}
// 查询未提交明细列表
export function getSummaryStaff(data) {
data.method = 'dj.api.smartcarlife.digital.management.record.staff.summary'
return request(data, 'post')
data.method = "dj.api.smartcarlife.digital.management.record.staff.summary"
return request(data, "post")
}
// 更新模版绑定员工
export function updateStaff(data) {
data.method = 'dj.api.smartcarlife.digital.management.template.staff.ref.update'
return request(data, 'post')
data.method =
"dj.api.smartcarlife.digital.management.template.staff.ref.update"
return request(data, "post")
}
// 导出未提交明细列表
export function exportSummary(data) {
data.method = 'dj.api.smartcarlife.digital.management.record.staff.summary.export'
return request(data, 'post')
data.method =
"dj.api.smartcarlife.digital.management.record.staff.summary.export"
return request(data, "post")
}
// 所有督导
export function getAllStaff(data) {
// data.method = 'dj.api.smartcarlife.staff.specificBusinessRolePerson.areaSupervision.pageConfigured'
// data.method = 'dj.api.smartcarlife.staff.specificBusinessRolePerson.areaSupervision.listConfigured'
data.method = 'dj.api.smartcarlife.digital.management.supervision.staff.list'
return request(data, 'post')
data.method = "dj.api.smartcarlife.digital.management.supervision.staff.list"
return request(data, "post")
}
// 收入测算-白名单员工分页
export function getWhiteStaff(data) {
data.method = 'dj.smartcarlife.api.incomeMeasurement.white.staff.list'
return request(data, 'post')
data.method = "dj.smartcarlife.api.incomeMeasurement.white.staff.list"
return request(data, "post")
}
// 收入测算-查询收入测算配置开关
export function getSwitchConfig(data = {}) {
data.method = 'dj.smartcarlife.api.incomeMeasurement.switch.config.get'
return request(data, 'post')
data.method = "dj.smartcarlife.api.incomeMeasurement.switch.config.get"
return request(data, "post")
}
// 收入测算-添加白名单员工
export function addWhiteStaff(data) {
data.method = 'dj.smartcarlife.api.incomeMeasurement.white.staff.add'
return request(data, 'post')
data.method = "dj.smartcarlife.api.incomeMeasurement.white.staff.add"
return request(data, "post")
}
// 收入测算配置开关更新
export function addSwitchConfig(data) {
data.method = 'dj.smartcarlife.api.incomeMeasurement.switch.config.add'
return request(data, 'post')
data.method = "dj.smartcarlife.api.incomeMeasurement.switch.config.add"
return request(data, "post")
}
// 收入测算-删除白名单员工
export function delWhiteStaff(data) {
data.method = 'dj.smartcarlife.api.incomeMeasurement.white.staff.del'
return request(data, 'post')
data.method = "dj.smartcarlife.api.incomeMeasurement.white.staff.del"
return request(data, "post")
}
// 查询员工详情
export function getStaffInfo(data) {
data.method = 'dj.smartcarlife.api.incomeMeasurement.staff.info.get'
return request(data, 'post')
data.method = "dj.smartcarlife.api.incomeMeasurement.staff.info.get"
return request(data, "post")
}
// 职级介绍配置查询
export function getRankConfig(data) {
data.method = 'dj.smartcarlife.api.job.rank.config.get'
return request(data, 'post')
data.method = "dj.smartcarlife.api.job.rank.config.get"
return request(data, "post")
}
// 职级介绍配置更新
export function addRankConfig(data) {
data.method = 'dj.smartcarlife.api.job.rank.config.add'
return request(data, 'post')
data.method = "dj.smartcarlife.api.job.rank.config.add"
return request(data, "post")
}
// 员工收入测算
export function getIncomePage(data) {
data.method = 'dj.api.smartcarlife.staff.incomeCalculation.page'
return request(data, 'post')
data.method = "dj.api.smartcarlife.staff.incomeCalculation.page"
return request(data, "post")
}
// 获取商品信息列表
export function listGoodsType(data = {}) {
data.method = 'dj.api.smartcarlife.staff.incomeCalculation.listGoodsType'
return request(data, 'post')
data.method = "dj.api.smartcarlife.staff.incomeCalculation.listGoodsType"
return request(data, "post")
}
// 复制绩效方案
export function copyPerformanceApi(data) {
data.method = `${path2}merchantPerformanceConfig.copyConfig`
return request(data, 'post')
return request(data, "post")
}
// 获取员工是否是可查看工资白名单
export function staffWhiteListFlagApi(data) {
data.method = `${path2}staffBaseInfo.whiteList.select`
return request(data, 'post')
return request(data, "post")
}
// 根据员工手机号获取员工所在园区店
export function yqMerchantListByStaffPhoneApi(data) {
data.method = `${path2}staffBaseInfo.yqMerchantInfo.list`
return request(data, 'post')
return request(data, "post")
}
// 根据园区店商户号获取1.1和2.1场景下4S店列表
export function merchantListByYqMerchantApi(data) {
data.method = `${path2}scene.shopMerchant.list`
return request(data, 'post')
return request(data, "post")
}
// 员工调店分配新增
export function addStaffDailyReportConfigApi(data) {
data.method = `${path2}staffDailyReportConfig.add`
return request(data, 'post')
return request(data, "post")
}
// 员工调店分配配置修改
export function updateStaffDailyReportConfigApi(data) {
data.method = `${path2}staffDailyReportConfig.update`
return request(data, 'post')
return request(data, "post")
}
// 员工调店分配配置删除
export function deleteStaffDailyReportConfigApi(data) {
data.method = `${path2}staffDailyReportConfig.delete`
return request(data, 'post')
return request(data, "post")
}
// 更新指定员工记录项内容
export function updateTmlpStaffItem(data) {
data.method = `${path2}digital.management.staff.item.update`
return request(data, 'post')
return request(data, "post")
}
/**
* 打卡申诉列表
*/
export function getClockSalaryList(data = {}) {
data.method = 'dj.api.smartcarlife.clock.in.staff.appeal.list'
return request(data, 'post')
data.method = "dj.api.smartcarlife.clock.in.staff.appeal.list"
return request(data, "post")
}
/**
* 打卡申诉列表导出
*/
export function exportClockSalaryList(data = {}) {
data.method = 'dj.api.smartcarlife.clock.in.staff.appeal.list.export'
return request(data, 'post')
data.method = "dj.api.smartcarlife.clock.in.staff.appeal.list.export"
return request(data, "post")
}
// 获取员工月度扣款明细
export function getStaffDeductDetailAPI(data) {
data.method = `${path2}staffMonthSalary.deductDetail`
return request(data, 'post')
return request(data, "post")
}
// 获取员工考勤明细
export function getStaffAttendanceDetailAPI(data) {
data.method = `${path2}clock.in.staff.attendance.detail`
return request(data, "post")
}
\ No newline at end of file
}
// 查询录音标签
export function getRecordTagList(data) {
data.method = `${path2}reception.findRecordingTagByBatchId`
return request(data, "post")
}
// 查询质检列表|侧边栏
export function getQualityList(data) {
data.method = `${path2}reception.findCheckResultByBatchId`
return request(data, "post")
}
// 查询对话内容
export function getConversationDetail(data) {
data.method = `${path2}reception.findConversationDetailByBatchIdNew`
return request(data, "post")
}
// dj.api.smartcarlife.performanceSalaryConfig.page 分页查询绩效工资扣减规则
export function getPerformanceSalaryConfigAPI(data) {
data.method = "dj.api.smartcarlife.performanceSalaryConfig.page"
return request(data, "post")
}
// 批量新增或修改绩效工资扣减规则
export function updatePerformanceSalaryConfigAPI(data) {
data.method =
"dj.api.smartcarlife.performanceSalaryConfig.batchInsertOrUpdate"
return request(data, "post")
}
// 配置圈定产品
export function targetProductConfigAPI(data) {
data.method = `${path2}merchantPerformanceProductDefine.batchInsertOrUpdate`
return request(data, "post")
}
// 获取圈定产品列表数据
export function getTargetProductConfigListAPI(data) {
data.method = `${path2}merchantPerformanceProductDefine.page`
return request(data, "post")
}
// 校验圈定产品/套餐是否可被删除
export function checkProductDefineAPI(data) {
data.method = `${path2}merchantPerformanceProductDefine.deleteValid`
return request(data, "post")
}
......@@ -245,7 +245,7 @@ export function getSunshineIncentivePoint(data) {
return request(data)
}
// 获取4s店某场景类型相关的员工列表
// 获取4s店某场景类型相关的员工列表
export function getStaffDataApi(data) {
data.method = `dj.api.smartcarlife.staff.listBySceneShop`
return request(data)
......@@ -280,3 +280,27 @@ export function personalConfigImport(data) {
data.method = `dj.api.smartcarlife.employee.delivery.deal.rate.import`
return request(data, "post", ["file"])
}
// 批量设置运营人员
export function shopBatchSet(data) {
data.method = 'dj.api.smartcarlife.serviceMerchant.shopOperation.setting.batch'
return request(data, "post")
}
// 批量设置展业场景
export function busiBatchSet(data) {
data.method = 'dj.api.smartcarlife.serviceMerchant.BusinessDev.setting.batch'
return request(data, "post")
}
// 查询地图行政区域省市区三级结构
export function getDistrictDetail(data) {
data.method = 'dj.api.smartcarlife.map.districts.details'
return request(data)
}
// 获取嘀加设置的服务商
export function getMerService(data) {
data.method = 'dj.smartcarlife.api.merchant.dj.serviceList'
return request(data)
}
......@@ -795,8 +795,8 @@ export const warningStatus = [
// 转账管理-对账方式
export const rangeType = [
{ confId: 1, confValue: '按周期' },
{ confId: 2, confValue: '按订单' }
{ confId: 1, confValue: "按周期" },
{ confId: 2, confValue: "按订单" }
]
// 规则审核-类型
......@@ -886,6 +886,20 @@ export const refundExamine_status = [
{ confId: 4, confValue: "已完成" },
{ confId: 5, confValue: "驳回" }
]
// 订单管理-退款审核-审批类型
export const refundExamine_approveTypeOpt = [
{ confId: 1, confValue: "嘀加审批" },
{ confId: 2, confValue: "企微OA审批" }
]
// 订单管理-退款审核-企微审批状态
export const oaApproveStatusOpt = [
{ confId: 1, confValue: "审批中" },
{ confId: 2, confValue: "已通过" },
{ confId: 3, confValue: "已驳回" },
{ confId: 4, confValue: "已撤销" }
]
// 虚拟对公账户银盛到账模式
export const receiptModeList = [
{ confId: 1, confValue: "T+1" },
......@@ -944,7 +958,8 @@ export const contentTypeList = [
{ confId: 1, confValue: "图文" },
{ confId: 2, confValue: "视频" },
{ confId: 3, confValue: "pdf" },
{ confId: 4, confValue: "优秀话术" }
{ confId: 4, confValue: "优秀话术" },
{ confId: 5, confValue: "学习任务" }
]
// 内容管理-员工群发-发送状态
......@@ -1053,7 +1068,8 @@ export const staffLevelList = [
{ confId: 6, confValue: "大店长" },
{ confId: 7, confValue: "初级区域督导" },
{ confId: 8, confValue: "中级区域督导" },
{ confId: 9, confValue: "高级区域督导" }
{ confId: 9, confValue: "高级区域督导" },
{ confId: 11, confValue: "驻店零售" }
]
// 所属业务
......@@ -1282,3 +1298,34 @@ export const InvoicingOpt = [
{ confId: "1", confValue: "蓝票" },
{ confId: "2", confValue: "红票" }
]
// 待付清单 数据来源
export const transferSourceOpt = [
{ confId: 1, confValue: "嘀加退款" },
{ confId: 0, confValue: "企微OA" }
]
// 待付清单 数据来源
export const bill_statusOpt = [
{ confId: 0, confValue: "未推送" },
{ confId: 1, confValue: "成功" },
{ confId: 2, confValue: "失败" },
{ confId: -1, confValue: "无需推送" }
]
// 待付清单 付款方式
export const payTypeOpt = [
{ confId: 0, confValue: "银行转账" },
{ confId: 1, confValue: "现金" },
{ confId: 2, confValue: "银行承兑汇票" },
{ confId: 3, confValue: "信用证" },
{ confId: 4, confValue: "冲账" },
{ confId: 5, confValue: "其他" }
]
// 待付清单 详情日志操作项
export const transferStatusOpt = [
{ confId: 0, confValue: "获取付款单" },
{ confId: 1, confValue: "推送付款单" },
{ confId: 2, confValue: "重推付款单" }
]
......@@ -78,6 +78,7 @@
:index="scope.$index"
:prop="item.prop"
:width="item.width"
:columnsObj="item"
/>
<template v-else-if="item.type == 'ownSerialNum'">
<span>{{
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-01 15:03:31
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-04-08 10:33:45
* @LastEditTime: 2025-06-11 11:33:58
*/
const _import = require("@/libs/util.import." + process.env.NODE_ENV)
export const routerName = {
......@@ -186,6 +186,14 @@ export const routerName = {
label: "考勤/工资申诉",
handle: "handleClockSalaryIndex"
},
{
authId: "9120512",
parentId: "91205",
category: "Button",
type: "default",
label: "绩效扣减",
handle: "handleDeduction"
}
],
component: _import("residentManage/inStoreManage/inStoreControlList")
},
......@@ -723,6 +731,14 @@ export const routerName = {
category: "Button",
type: "primary",
handle: "handleCopyConfig"
},
{
authId: "9121212",
parentId: "91212",
label: "圈定产品",
category: "Button",
type: "default",
handle: "handleDefine"
}
],
component: _import("residentManage/salaryPerformance/index")
......
......@@ -60,6 +60,11 @@ export const routerName = {
authId: "91304",
name: "统计",
parentId: "91301"
},
{
authId: "91320",
name: "统计",
parentId: "91301"
}
]
},
......@@ -158,6 +163,29 @@ export const routerName = {
],
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: {
path: "/staffMassSending",
......@@ -209,6 +237,18 @@ export const routerName = {
parentId: "91305",
label: "统计",
handle: "goStatisticsPage",
// attr
ruleObj: {
attr: "contentType",
rule: {
0: "统计",
1: "统计",
2: "统计",
3: "统计",
4: "统计",
5: "详情"
}
},
addRoutePath: [
{
authId: "9130506",
......@@ -369,5 +409,62 @@ export const routerName = {
},
auth: [],
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
<!-- 关联门店弹窗 -->
<template>
<d2-dialog
title="选择员工"
:is-visible.sync="relateStoreVisible"
width="1280px"
btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose"
class="relateEmp"
>
<d2-dialog title="选择员工" :is-visible.sync="relateStoreVisible" width="1280px" btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateEmp">
<el-row class="tableCon">
<div class="tableBox">
<div class="tableHeader">选择员工</div>
<div class="tableBody">
<el-form :model="storeSearchForm" ref="relate" :inline="true">
<el-form-item label="员工名称:">
<el-input
v-model.trim="storeSearchForm.staffName"
placeholder="请输入员工名称"
max-length="20"
clearable
/>
<el-input v-model.trim="storeSearchForm.staffName" placeholder="请输入员工名称" max-length="20" clearable />
</el-form-item>
<el-form-item label="员工手机号:">
<el-input
v-model.trim="storeSearchForm.staffPhone"
placeholder="请输入手机号"
max-length="20"
clearable
/>
<el-input v-model.trim="storeSearchForm.staffPhone" placeholder="请输入手机号" max-length="11" type="number"
clearable />
</el-form-item>
<div class="text-align: right;">
<el-button type="primary" @click="handleCurrentChange(1)"
>搜索</el-button
>
<el-button type="primary" @click="handleCurrentChange(1)">搜索</el-button>
</div>
</el-form>
</div>
<el-table
ref="seletingTable"
:data="selectingData"
height="264px"
class="table"
border
@select="handleChange"
@select-all="handleAll"
>
<el-table ref="seletingTable" :data="selectingData" height="264px" class="table" border @select="handleChange"
@select-all="handleAll">
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="staffName" label="员工名称" align="center">
</el-table-column>
<el-table-column prop="staffPhone" label="手机号" align="center">
</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"
/>
<el-pagination small background @current-change="handleCurrentChange" :current-page.sync="currentPage"
:page-size="pageSize" layout="total, prev, pager, next" :total="total" />
</div>
<div class="tableBox">
<div class="tableHeader">
......@@ -116,7 +84,7 @@ export default {
}
},
mounted() {},
mounted() { },
watch: {
relateStoreVisible: {
handler(val) {
......@@ -165,8 +133,8 @@ export default {
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.id !== row.id
))
(item) => item.id !== row.id
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
......@@ -202,9 +170,11 @@ export default {
.relateEmp .tableCon {
display: flex;
gap: 10px;
.tableBox {
width: calc(50% - 10px);
border: 1px solid #e5e5e5;
.tableHeader {
opacity: 1;
background: #f5f5f5;
......@@ -213,41 +183,51 @@ export default {
display: flex;
font-size: 14px;
justify-content: space-between;
.clear-btn {
color: #409eff;
cursor: pointer;
}
}
.tableBody {
padding: 16px;
.tab-box {
margin-bottom: -20px;
.el-tabs__nav-wrap {
&::after {
display: none;
}
}
}
.el-input {
width: 170px;
}
.el-range-editor--medium.el-input__inner {
width: 300px !important;
}
}
}
}
.service-store .relateEmp .el-table .cell,
.d2-form .relateEmp .el-table .cell {
line-height: 26px !important;
}
.service-store .relateEmp .el-table--medium td,
.d2-form .relateEmp .el-table--medium td {
padding: 6px 8px !important;
}
.relateEmp .red {
color: red;
}
.relateEmp .tip-icon {
position: absolute;
display: inline-block;
......
<!-- 关联门店弹窗 -->
<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-select @change="handleCurrentChange(1)" v-model="storeSearchForm.type" placeholder="课程名称" max-length="20"
@keydown.native="handleStoreInput" clearable>
<el-option label="推荐课程" :value="1"> </el-option>
<el-option label="自选课程" :value="2">
</el-option>
</el-select>
</el-form-item>
<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" :empty-text="emptyText">
<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 { contentManagerTaskCourseList } from "@/api/contentManager"
export default {
name: "RelateStoreDialog",
data() {
return {
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 20,
storeSearchForm: {
courseName: '',
type: 1
}
}
},
props: {
relateStoreVisible: {
type: Boolean,
default: false
},
storeSelected: {
type: Array,
default: () => []
},
filterSopType: {
type: Array,
default: () => []
}
},
computed: {
emptyText: {
get() {
if (this.storeSearchForm.type == 1 && !this.filterSopType.length) {
return '请选择员工标签,匹配推荐课程'
} else {
return '暂无匹配推荐课程'
}
}
}
},
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() {
// const name = this.storeSearchForm.type == 1 ? contentManagerTaskCourseList : findStaffTagCoursePage
// 如果没有选标签,直接为空
if (this.storeSearchForm.type == 1 && !this.filterSopType.length) {
this.selectingData = []
this.total = 0
this.$nextTick(() => {
this.recoverySelection()
})
return
}
findStaffTagCoursePage({
...this.storeSearchForm,
currentPage: this.currentPage,
tagIds: this.storeSearchForm.type == 1 ? this.filterSopType : [],
pageSize: this.pageSize
}).then((res) => {
console.log(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-dialog
:is-visible="dialogVisible"
class="accountDailog"
title="选择门店"
width="720px"
@confirmDialog="handleAddConfirm"
@closeDialog="handleClose"
>
<d2-dialog :appendToBody="true" :is-visible="dialogVisible" class="accountDailog" title="选择门店" width="720px"
@confirmDialog="handleAddConfirm" @closeDialog="handleClose">
<div class="tableBox">
<div style="padding: 10px 50px">
<el-input
v-model="realSearchForm.merchantName"
placeholder="搜索门店名称"
maxlength="20"
clearable
size="small"
style="width: 300px; margin-right: 12px"
/>
<el-input v-model="realSearchForm.merchantName" placeholder="搜索门店名称" maxlength="20" clearable size="small"
style="width: 300px; margin-right: 12px" />
<el-button size="small" type="primary" @click="searchList">
查询
</el-button>
</div>
<d2-table
ref="merchantTable"
:search-form="realSearchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
>
<d2-table ref="merchantTable" :search-form="realSearchForm" :table-params="tableParams" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
</d2-table>
</div>
</d2-dialog>
......@@ -55,6 +37,10 @@ export default {
selectedRecord: {
type: Array,
default: () => []
},
selectedList: {
type: Array,
default: () => []
}
},
data() {
......@@ -77,10 +63,10 @@ export default {
}
}
},
mounted() {},
mounted() { },
methods: {
recoverySelection(list) {
var exitIds = this.selectedRecord.map((item) => +item.merchantId)
var exitIds = this.selectedList.map((item) => +item.merchantId)
console.log(exitIds)
list.forEach((item) => {
console.log(item.merchantId, "item.merchantId")
......@@ -113,7 +99,7 @@ export default {
handleAddConfirm() {
const selectItemList =
this.$refs.merchantTable?.mutiSelectArr?.[
this.tableParams.mutiSelectName
this.tableParams.mutiSelectName
] || []
if (selectItemList.length) {
this.$emit("confirmDialogFn", selectItemList)
......
<template>
<div class="tag-main">
<el-dialog
title="选择标签"
:visible.sync="dialogVisible"
width="50%"
:before-close="handleClose"
>
<el-dialog title="选择标签" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<div class="tag-panel">
<div class="tag-panel-select">
<div class="tag-title">预选标签</div>
<div class="tag-select-box">
<div class="tag-box-header">
<el-input
size="small"
v-model="labelGroupName"
placeholder="请输入搜索内容"
clearable
@keydown.enter.native="handleSearch"
></el-input>
<el-button size="small" type="primary" @click="handleSearch"
>查询</el-button
>
<el-input size="small" v-model="labelGroupName" placeholder="请输入搜索内容" clearable
@keydown.enter.native="handleSearch"></el-input>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button size="small" @click="handleReset">重置</el-button>
</div>
<div
class="checkbox-group-box"
v-loading="loading"
:style="{ height: heightBox + 'px' }"
>
<div
style="margin-bottom: 8px"
class="checkbox-box"
v-for="(item, index) in labelTreeRets"
:key="index"
@click.self="item.checked = !item.checked"
>
<span
class="el-tree-node__expand-icon el-icon-caret-right"
:class="{ expanded: item.checked }"
@click.self="item.checked = !item.checked"
></span>
<div class="checkbox-group-box" v-loading="loading" :style="{ height: heightBox + 'px' }">
<div style="margin-bottom: 8px" class="checkbox-box" v-for="(item, index) in labelTreeRets" :key="index"
@click.self="item.checked = !item.checked">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }"
@click.self="item.checked = !item.checked"></span>
{{ item.labelGroup.name }}
<el-tag :size="size">{{ item.labelType }}</el-tag>
<el-radio-group
class="tag-group"
v-model="item.tagChecked"
v-if="item.checked"
@change="handleCheckedTag"
>
<div
v-for="(itm, idx) in item.labelList"
:key="idx"
class="radio-tag"
>
<el-tooltip
effect="dark"
placement="top"
:disabled="itm.name.length < 8"
>
<el-radio
:disabled="isLabelType(item.labelType)"
class="radio-text"
:label="itm"
>{{ itm.name }}</el-radio
>
<el-radio-group class="tag-group" v-model="item.tagChecked" v-if="item.checked"
@change="handleCheckedTag">
<div v-for="(itm, idx) in item.labelList" :key="idx" class="radio-tag">
<el-tooltip effect="dark" placement="top" :disabled="itm.name.length < 8">
<el-radio :disabled="isLabelType(item.labelType)" class="radio-text" :label="itm">{{ itm.name
}}</el-radio>
<!-- <el-radio :label="itm">{{ itm.name.length > 4 ? itm.name.slice(0, 3) + '...' : itm.name }}</el-radio> -->
<div slot="content">{{ itm.name }}</div>
</el-tooltip>
......@@ -79,16 +39,8 @@
<div class="tag-box-header">标签名称({{ selectNum }}项)</div>
<div class="tag-selected-box" :style="{ height: heightBox + 'px' }">
<template v-for="item in labelTreeRetSelect">
<el-tag
:title="item.tagChecked.name"
v-if="item.tagChecked"
type="info"
class="tag-selected-item"
:key="item.tagChecked"
closable
:disable-transitions="false"
@close="remove(item, idx)"
>
<el-tag :title="item.tagChecked.name" v-if="item.tagChecked" type="info" class="tag-selected-item"
:key="item.tagChecked" closable :disable-transitions="false" @close="remove(item, idx)">
{{ item.tagChecked.name }}
</el-tag>
</template>
......@@ -98,9 +50,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect"
>确 定</el-button
>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -120,30 +70,6 @@ export default {
searchStatus: false,
labelTreeRetSelect: [],
labelTreeRets: [
// {
// labelGroup: { id: '109', name: '湖口123' },
// labelList: [
// { id: '372', name: '12345678' },
// { id: '371', name: '7654321' },
// { id: '370', name: '1234567' }
// ],
// checked: false,
// tagChecked: [],
// isIndeterminate: false,
// checkAll: false
// },
// {
// labelGroup: { id: '65', name: '自店标签111' },
// labelList: [
// { id: '179', name: '标签44' },
// { id: '178', name: '标签33' },
// { id: '176', name: '标签1112' }
// ],
// checked: false,
// tagChecked: [],
// isIndeterminate: false,
// checkAll: false
// }
]
}
},
......@@ -343,8 +269,10 @@ export default {
// }
.tag-panel {
display: flex;
.tag-panel-select {
width: 60%;
::v-deep .el-checkbox__label {
width: 100%;
vertical-align: middle;
......@@ -354,9 +282,11 @@ export default {
word-wrap: break-word;
}
}
.tag-panel-selected {
width: 40%;
margin-left: 10px;
.tag-box-header {
font-size: 14px;
font-weight: 400;
......@@ -365,17 +295,20 @@ export default {
padding-left: 20px !important;
}
}
.tag-title {
font-size: 16px;
font-weight: 400;
color: #333333;
line-height: 22px;
}
.tag-select-box {
margin-top: 10px;
border-radius: 2px;
border: 1px solid #eeeeee;
padding: 6px;
.tag-box-header {
box-sizing: border-box;
display: flex;
......@@ -385,11 +318,13 @@ export default {
margin: -6px;
margin-bottom: 10px;
padding: 0px 6px;
::v-deep .el-input {
width: 60%;
margin-right: 10px;
}
}
.tag-selected-item {
margin: 0px 6px 6px 0px;
height: 26px;
......@@ -400,21 +335,26 @@ export default {
// overflow: hidden;
// white-space: nowrap;
}
.el-tree-node__expand-icon {
color: #5850ff;
font-size: 16px;
}
.tag-group {
margin-left: 26px;
display: flex;
flex-wrap: wrap;
.radio-tag {
display: inline-block;
width: 50%;
.el-radio {
margin: 8px 0;
display: inline-flex;
align-items: center;
::v-deep .el-radio__label {
display: inline-block;
max-width: 120px;
......@@ -428,8 +368,10 @@ export default {
}
}
}
.checkbox-group-box {
overflow: auto;
.checkbox-box {
cursor: pointer;
font-size: 14px;
......@@ -437,6 +379,7 @@ export default {
font-weight: 400;
color: #333333;
line-height: 20px;
::v-deep .el-tag {
color: #aaa5fa !important;
font-size: 12px;
......@@ -445,6 +388,7 @@ export default {
}
}
}
.tag-selected-box {
min-height: 200px;
overflow-y: auto;
......
<template>
<div class="tag-main select-tag">
<GLDialog
bigTitle="选择标签"
mode="big"
:visible.sync="dialogVisible"
:before-close="handleClose"
>
<GLDialog bigTitle="选择标签" mode="big" :visible.sync="dialogVisible" :before-close="handleClose">
<div class="tag-panel">
<div class="tag-panel-select">
<div class="tag-title">预选标签</div>
<div class="tag-select-box">
<div class="tag-box-header">
<el-input
size="small"
v-model="labelGroupName"
placeholder="请输入搜索内容"
></el-input>
<el-button size="small" type="primary" @click="handleSearch"
>查询</el-button
>
<el-input size="small" v-model="labelGroupName" placeholder="请输入搜索内容"></el-input>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
</div>
<div
class="checkbox-group-box"
:style="{ height: heightBox + 'px' }"
v-loading="loading"
>
<div
style="margin-bottom: 8px"
v-for="(item, index) in labelTreeRets"
:key="index"
>
<span
class="el-tree-node__expand-icon el-icon-caret-right"
:class="{ expanded: item.checked }"
@click.self="item.checked = !item.checked"
></span>
<el-checkbox
:indeterminate="item.isIndeterminate"
v-model="item.checkAll"
@change="handleCheckAllChange(item.checkAll, index)"
>{{ item.labelGroup.name }}({{ item.tagChecked.length }}/{{
<div class="checkbox-group-box" :style="{ height: heightBox + 'px' }" v-loading="loading">
<div style="margin-bottom: 8px" v-for="(item, index) in labelTreeRets" :key="index">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }"
@click.self="item.checked = !item.checked"></span>
<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll"
@change="handleCheckAllChange(item.checkAll, index)">{{ item.labelGroup.name }}({{
item.tagChecked.length }}/{{
item.labelList.length
}}
项)
</el-checkbox>
<div style="margin: 15px 0"></div>
<el-checkbox-group
class="tag-group"
v-model="item.tagChecked"
@change="handleCheckedChange(item.tagChecked, index)"
v-if="item.checked"
>
<el-checkbox
v-for="(itm, idx) in item.labelList"
:label="itm"
:key="idx"
>{{ itm.name || itm.labelName }}</el-checkbox
>
<el-checkbox-group class="tag-group" v-model="item.tagChecked"
@change="handleCheckedChange(item.tagChecked, index)" v-if="item.checked">
<el-checkbox v-for="(itm, idx) in item.labelList" :label="itm" :key="idx">{{ itm.name || itm.labelName
}}</el-checkbox>
</el-checkbox-group>
</div>
</div>
......@@ -73,10 +41,8 @@
<div class="tag-content">
<p class="tag-ex">说明:</p>
<p>
标签组内已选标签取<span class="tag-ex">并集(或)</span
>,即满足一个条件即可、标签组之间取<span class="tag-ex"
>交集(且)</span
>,即同时满足标签组条件。
标签组内已选标签取<span class="tag-ex">并集(或)</span>,即满足一个条件即可、标签组之间取<span
class="tag-ex">交集(且)</span>,即同时满足标签组条件。
</p>
<img src="./assets/groupTips.png" alt="" />
</div>
......@@ -88,11 +54,7 @@
标签名称({{ selectNum }}项)<span @click="clearTag">清空</span>
</div>
<div class="tag-selected-box" :style="{ height: heightBox + 'px' }">
<div
v-show="!!selectNum"
class="tag-line-and"
:style="{ height: heightBox + 'px' }"
>
<div v-show="!!selectNum" class="tag-line-and" :style="{ height: heightBox + 'px' }">
<p class="tag-line"></p>
<p class="tag-and" :style="{ top: heightBox / 2 - 20 + 'px' }">
且
......@@ -105,16 +67,8 @@
</p>
<span v-for="(tag, idx) in item.tagChecked" :key="idx">
<span class="tag-txt" v-show="idx != 0">或</span>
<el-tag
:title="tag.name"
type="info"
class="customer-tag-selected-item"
:key="idx"
v-if="tag"
closable
:disable-transitions="false"
@close="remove(item, idx)"
>
<el-tag :title="tag.name" type="info" class="customer-tag-selected-item" :key="idx" v-if="tag"
closable :disable-transitions="false" @close="remove(item, idx)">
{{
tag.name.length > 11
? tag.name.slice(0, 11) + "..."
......@@ -130,9 +84,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleClose"> 取 消 </el-button>
<el-button size="small" type="primary" @click="handleSelect"
>确 定</el-button
>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</GLDialog>
</div>
......@@ -447,10 +399,13 @@ export default {
margin-bottom: 10px;
}
}
.tag-panel {
display: flex;
.tag-panel-select {
width: 60%;
::v-deep .el-checkbox__label {
width: 100%;
vertical-align: middle;
......@@ -460,9 +415,11 @@ export default {
word-wrap: break-word;
}
}
.tag-panel-selected {
width: 40%;
margin-left: 10px;
.tag-box-header {
font-size: 14px;
font-weight: 400;
......@@ -470,6 +427,7 @@ export default {
line-height: 20px;
padding: 0 20px !important;
display: flex;
span {
margin-left: auto;
cursor: pointer;
......@@ -477,17 +435,20 @@ export default {
}
}
}
.tag-title {
font-size: 16px;
font-weight: 400;
color: #333333;
line-height: 22px;
}
.tag-select-box {
margin-top: 10px;
border-radius: 2px;
border: 1px solid #eeeeee;
padding: 6px;
.tag-box-header {
box-sizing: border-box;
display: flex;
......@@ -497,11 +458,13 @@ export default {
margin: -6px;
margin-bottom: 10px;
padding: 0px 6px;
::v-deep .el-input {
width: 60%;
margin-right: 10px;
}
}
.tag-selected-item {
margin: 0px 6px 6px 0px;
height: 26px;
......@@ -512,21 +475,26 @@ export default {
// overflow: hidden;
// white-space: nowrap;
}
.el-tree-node__expand-icon {
// color: #5850ff;
font-size: 16px;
}
.tag-group {
margin-left: 26px;
display: flex;
flex-wrap: wrap;
.radio-tag {
display: inline-block;
width: 50%;
.el-radio {
margin: 8px 0;
display: inline-flex;
align-items: center;
::v-deep .el-radio__label {
display: inline-block;
max-width: 120px;
......@@ -540,8 +508,10 @@ export default {
}
}
}
.checkbox-group-box {
overflow: auto;
.checkbox-box {
cursor: pointer;
font-size: 14px;
......@@ -549,6 +519,7 @@ export default {
font-weight: 400;
color: #333333;
line-height: 20px;
::v-deep .el-tag {
// color: #aaa5fa !important;
font-size: 12px;
......@@ -557,6 +528,7 @@ export default {
}
}
}
// .tag-selected-box {
// min-height: 200px;
// overflow-y: auto;
......@@ -564,6 +536,7 @@ export default {
.checkbox-group-box {
overflow: auto;
}
.tag-selected-box {
min-height: 200px;
display: flex;
......@@ -572,27 +545,33 @@ export default {
::v-deep .el-tooltip__popper.is-light {
width: 1000px !important;
}
.tool-gltip {
::v-deep .el-tooltip__popper.is-light {
width: 1000px !important;
}
::v-deep .el-tooltip__popper {
width: 1000px !important;
}
.tag-content {
background: #fff;
overflow: hidden;
width: 500px;
padding: 10px;
p {
margin: 3px 0;
}
.tag-ex {
color: #333333;
font-weight: 600;
}
}
}
.tag-img {
display: inline-block;
width: 14px;
......
<template>
<d2-dialog title="选择区域" :appendToBody="true" :is-visible="dialogVisible" class="brand-dialog" width="30%"
@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-item>
<el-button type="primary" @click="resetChecked">清空</el-button>
<!-- <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.name }}<i class="el-icon-close"
@click="closeChecked(item)"></i></div>
</div>
</template>
</div> -->
</div>
</d2-dialog>
</template>
<script>
import { deepClone } from "@/common/util"
import { mapDistricts } from "@api/contentManager"
export default {
name: "brandTree",
props: {
dialogVisible: Boolean,
selectedList: Array
},
data() {
return {
filterText: '',
checked: false,
checkList: [],
brandData: [],
defaultProps: {
children: 'child',
label: 'name'
},
selectList: []
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
// selectedList(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 mapDistricts({})
console.log(res, 'res')
this.brandData = res.districts[0].districts.map(item => {
item.id = item.code
// item.label = item.name
item.child = item.districts.map(child => {
child.id = child.code
// child.label = child.name
return child
})
return item
})
this.$nextTick(() => {
const defaultKeys = this.selectedList.reduce((pre, item) => {
// pre.push(item.id)
item.child.forEach(i => {
pre.push(i.id)
})
return pre;
}, [])
console.log(defaultKeys, 'defaultKeys')
this.$refs.tree.setCheckedKeys(defaultKeys)
})
},
handleClose() {
this.resetChecked()
this.$emit('closeDialogFn')
},
handleConfirm() {
this.resetChecked()
console.log(this.checkList, 'checkList')
const newList = this.filterCheckList(deepClone(this.checkList))
console.log(newList, 'newList')
// this.$emit('confirmDialogFn', {
// checkList: this.checkList,
// newList: newList
// })
this.$emit('confirmDialogFn', newList)
},
onSearch() {
this.$refs.tree.filter(this.filterText)
},
// 获取处理后的选中节点结构
getFilteredCheckedNodes() {
const checkedNodes = this.$refs.tree.getCheckedNodes(); // 全选中的节点
const halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(); // 半选中的节点keys
const result = [];
// 递归处理树形数据
const processNode = (node) => {
const newNode = { ...node };
// 清空子节点,后续只添加选中的子节点
newNode.child = [];
// 处理子节点
if (node.child && node.child.length > 0) {
node.child.forEach(child => {
const processedChild = processNode(child);
if (processedChild) {
newNode.child.push(processedChild);
}
});
}
// 判断节点是否应该保留:
// 1. 当前节点是全选中的叶子节点
// 2. 当前节点是半选中的父节点
// 3. 当前节点的子节点有选中的
const isChecked = checkedNodes.some(n => n.id === node.id);
const isHalfChecked = halfCheckedKeys.includes(node.id);
const hasCheckedChildren = newNode.child.length > 0;
if (isChecked || isHalfChecked || hasCheckedChildren) {
return newNode;
}
return null;
};
// 从根节点开始处理
this.brandData.forEach(rootNode => {
const processedRoot = processNode(rootNode);
if (processedRoot) {
result.push(processedRoot);
}
});
return result;
},
handleNodeClick(data) {
const filteredNodes = this.getFilteredCheckedNodes();
console.log('处理后的节点结构:', filteredNodes);
console.log(data, this.$refs.tree.getCheckedNodes());
// console.log(this.$refs.tree.getCheckedNodes(false, true));
this.checkList = this.getFilteredCheckedNodes();
},
filterCheckList(checkList) {
// 收集所有 children 中的 id
const childrenIds = new Set();
checkList.forEach(item => {
if (item.child && item.child.length > 0) {
item.child.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.name.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.child
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
<template>
<d2-dialog title="选择品牌" :appendToBody="true" :is-visible="dialogVisible" class="brand-dialog" width="30%"
@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-item>
<el-button type="primary" @click="resetChecked">清空</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.name }}<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,
selectedList: Array
},
data() {
return {
filterText: '',
checked: false,
checkList: [],
brandData: [],
defaultProps: {
children: 'child',
label: 'name'
},
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() {
let res = await getCarbrandTree()
res = res.map(item => {
item.name = item.label
item.child = []
if (item?.children) {
item.child = item?.children.map(child => {
child.name = child.label
return child
})
}
// delete item.children
return item
})
this.brandData = res
this.$nextTick(() => {
const defaultKeys = this.selectedList.reduce((pre, item) => {
// pre.push(item.id)
item.child.forEach(i => {
pre.push(i.id)
})
return pre;
}, [])
// console.log(this.dialogVisible, defaultKeys, 'defaultKeys')
this.$refs.tree.setCheckedKeys(defaultKeys)
})
},
handleClose() {
this.resetChecked()
this.$emit('closeDialogFn')
}, // 获取处理后的选中节点结构
getFilteredCheckedNodes() {
const checkedNodes = this.$refs.tree.getCheckedNodes(); // 全选中的节点
const halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(); // 半选中的节点keys
const result = [];
// 递归处理树形数据
const processNode = (node) => {
const newNode = { ...node };
// 清空子节点,后续只添加选中的子节点
newNode.child = [];
// 处理子节点
if (node.child && node.child.length > 0) {
node.child.forEach(child => {
const processedChild = processNode(child);
if (processedChild) {
newNode.child.push(processedChild);
}
});
}
// 判断节点是否应该保留:
// 1. 当前节点是全选中的叶子节点
// 2. 当前节点是半选中的父节点
// 3. 当前节点的子节点有选中的
const isChecked = checkedNodes.some(n => n.id === node.id);
const isHalfChecked = halfCheckedKeys.includes(node.id);
const hasCheckedChildren = newNode.child.length > 0;
if (isChecked || isHalfChecked || hasCheckedChildren) {
return newNode;
}
return null;
};
// 从根节点开始处理
this.brandData.forEach(rootNode => {
const processedRoot = processNode(rootNode);
if (processedRoot) {
result.push(processedRoot);
}
});
return result;
},
handleConfirm() {
this.resetChecked()
console.log(this.checkList, 'checkList')
const newList = this.filterCheckList(deepClone(this.checkList))
console.log(newList, 'newList')
this.$emit('confirmDialogFn', 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.getFilteredCheckedNodes();
// this.getFilteredCheckedNodes();
},
filterCheckList(checkList) {
// 收集所有 children 中的 id
const childrenIds = new Set();
checkList.forEach(item => {
if (item.child && item.child.length > 0) {
item.child.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.name.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.child
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
<!-- 关联门店弹窗 -->
<template>
<d2-dialog
:title="title"
:isShowFooter="false"
:noCancel="true"
:is-visible.sync="relateStoreVisible"
width="50%"
btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm"
@closeDialog="handleRelateStoreClose"
class="relateStore"
>
<d2-dialog :title="title" :noCancel="true" :is-visible.sync="relateStoreVisible" width="50%" btn-ok-label="确定"
@confirmDialog="handleRelateStoreConfirm" @closeDialog="handleRelateStoreClose" class="relateStore">
<slot />
<el-row class="tableCon">
<div class="tableBox">
<!-- height="300px" -->
<el-table
ref="seletingTable"
:data="selectingData"
class="table"
border
v-loading="$store.state.d2admin.loading.value"
>
<el-table ref="seletingTable" :data="selectingData" class="table" border
v-loading="$store.state.d2admin.loading.value" height="300px">
<el-table-column label="序号" type="index" align="center" width="60">
<template slot-scope="scope">{{
(pageNum - 1) * pageSize + scope.$index + 1
}}</template>
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</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>
<el-table-column prop="phoneNumber" label="手机号" align="center">
<el-table-column prop="staffPhone" label="手机号" align="center">
</el-table-column>
</el-table>
<el-pagination
small
background
@current-change="handleCurrentChange"
:current-page.sync="pageNum"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total"
/>
<!-- <el-pagination small background @current-change="handleCurrentChange" :current-page.sync="pageNum"
:page-size="pageSize" layout="total, prev, pager, next" :total="total" /> -->
</div>
</el-row>
</d2-dialog>
......@@ -76,7 +48,7 @@ export default {
},
storeApi: {
type: Function,
default: () => {}
default: () => { }
},
storeSelected: {
type: Array,
......@@ -84,7 +56,7 @@ export default {
},
storeSearchForm: {
type: Object,
default: () => {}
default: () => { }
},
merchantIds: {
type: Array,
......@@ -107,12 +79,6 @@ export default {
})
},
getSelectingList() {
const _storeSearchForm = this.storeSearchForm
// 会员权益/积分商城获取账户中心所有门店 接口不同 接口新增查询参数merchantName 不需单独处理
// if ([0, 4].includes(this.selectedScene)) {
// // 会员权益,积分商城场景查询门店名称参数
// _storeSearchForm.merchantIdName = _storeSearchForm.merchantName // 账户中心所有门店接口查询条件
// }
console.log(this.storeSearchForm, "this.storeSearchForm")
this.storeApi({
...this.storeSearchForm,
......@@ -144,8 +110,8 @@ export default {
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.staffUuid !== row.staffUuid
))
(item) => item.staffUuid !== row.staffUuid
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
......@@ -184,24 +150,30 @@ export default {
margin: 0 auto 20px !important;
width: 98%;
}
.relateStore .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;
......
/*
* @Description:
* @Description:
* @Author: huyue
* @Date: 2024-04-01 15:03:31
* @LastEditors: huyue
* @LastEditTime: 2024-09-02 16:06:04
*/
// 内容类型
export const CONTENT_TYPE_OPTIONS = [
{
......@@ -104,3 +105,75 @@ export const STATUS_ENUM = {
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>
<d2-container class="edit-content">
<div class="content-form">
......@@ -131,8 +130,8 @@
</el-form-item>
<el-form-item v-if="formData.showChannel == 3" prop="sceneMarketTagList" label="内容标签:" label-width="120px"
:style="{ 'margin-bottom': '22px' }">
<el-select v-model="formData.sceneMarketTagList" value-key="id" filterable @change="sceneMarketTagChange" multiple
placeholder="请选择" style="width: 430px">
<el-select v-model="formData.sceneMarketTagList" value-key="id" filterable @change="sceneMarketTagChange"
multiple placeholder="请选择" style="width: 430px">
<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)">
</el-option>
......@@ -204,7 +203,7 @@
<div>
<el-button style="width: 100%" type="primary" @click="addSection(3)">{{
hasSpecialTree ? "删除" : "插入"
}}产品常见提问</el-button>
}}产品常见提问</el-button>
</div>
<el-tree class="section-tree" :key="treeKey" ref="sectionTree" :data="sectionTreeData" node-key="id"
highlight-current default-expand-all :expand-on-click-node="false" draggable
......@@ -1739,8 +1738,8 @@ export default {
const res = await findAllTags()
this.sceneTagsList = res
if (sceneMarketTag) {
this.formData.sceneMarketTagList = sceneMarketTag.split(',').map(item => ({id: parseInt(item)}))
console.log(this.formData)
this.formData.sceneMarketTagList = sceneMarketTag.split(',').map(item => ({ id: parseInt(item) }))
console.log(this.formData)
}
},
sceneMarketTagChange(e) {
......
<!-- 规则配置 -->
<template>
<d2-container class="container">
<div class="header" slot="header">
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData">
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :form-data="showFormData">
<div slot="customerLabel">
<el-select v-model="searchForm.customerLabel" clearable value-key="labelId" @focus="focus('tag')" placeholder="请选择">
<el-option-group
v-for="group in tagList"
:key="group.labelId"
:label="group.labelName">
<el-option
v-for="item in group.nextList"
:key="item.labelId"
:label="item.labelName"
:value="item">
<el-select v-model="searchForm.customerLabel" clearable value-key="labelId" @focus="focus('tag')"
placeholder="请选择">
<el-option-group v-for="group in tagList" :key="group.labelId" :label="group.labelName">
<el-option v-for="item in group.nextList" :key="item.labelId" :label="item.labelName" :value="item">
</el-option>
</el-option-group>
</el-select>
</div>
<div slot="receptionScene">
<el-select v-model="searchForm.receptionScene" clearable value-key="id" @focus="focus('reception')" placeholder="请选择">
<el-option
v-for="item in receptionSceneList"
:key="item.id"
:label="item.receptionSceneName"
:value="item">
<el-select v-model="searchForm.receptionScene" clearable value-key="id" @focus="focus('reception')"
placeholder="请选择">
<el-option v-for="item in receptionSceneList" :key="item.id" :label="item.receptionSceneName" :value="item">
</el-option>
</el-select>
</div>
......@@ -56,21 +42,14 @@
</el-button>
</span> -->
</d2-table-header>
<d2-table
ref="contentTable"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<d2-table ref="contentTable" :search-form="searchFormSearch" :table-params="tableParams"
:get-list-api="getListApi" :before-search-fn="beforeSearchFn">
<div slot="merchantSlot" slot-scope="scope">
<div v-if="scope.scope.showMerchant == 0">全部门店</div>
<div v-else-if="scope.scope.showMerchant == null">-</div>
<el-popover v-else placement="top" width="245" trigger="hover">
<div class="merchant-wrap">
<div
class="merchant-name"
v-for="(item, index) in scope.scope.assignInfos || []"
:key="index">
<div class="merchant-name" v-for="(item, index) in scope.scope.assignInfos || []" :key="index">
{{ item.assignName }}
</div>
</div>
......@@ -82,11 +61,9 @@
</el-popover>
</div>
<div slot="statusSlot" slot-scope="scope">
<span
:style="{
'background-color': statusEnum[scope.scope.status].color
}"
class="circle"></span>
<span :style="{
'background-color': statusEnum[scope.scope.status].color
}" class="circle"></span>
<span>{{ statusEnum[scope.scope.status].name }}</span>
</div>
<div slot="auth-button" slot-scope="scope">
......@@ -121,29 +98,31 @@
</el-button>
</template> -->
<!-- 查看 -->
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9130102']" />
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130102']" />
</span>
<!-- 编辑 -->
<span style="margin-right: 10px;">
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130106']" />
</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']" />
</span>
<!-- -->
<template v-else>
<!-- 停用/启用 -->
<span style="margin-right: 10px;">
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130108']" />
</span>
<!-- 统计 -->
<span style="margin-right: 10px;">
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130103']" />
</span>
</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>
</d2-table>
</div>
......@@ -179,7 +158,7 @@ export default {
showChannel: "",
merchantId: "",
status: "",
meal: ''
meal: ""
},
showFormData: [
{
......@@ -208,7 +187,7 @@ export default {
optionsName: "sceneOptions",
changeAttr: (value, targetItem) => {
console.log(value)
if (value !== '') {
if (value !== "") {
this.getLabelList(value)
this.receptionList(value)
} else {
......@@ -280,7 +259,7 @@ export default {
{
label: "标题",
prop: "title",
minWidth:120
minWidth: 120
},
{
label: "类型",
......@@ -328,7 +307,12 @@ export default {
prop: "customerLabelInfoList",
minWidth: "300px",
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 {
prop: "productPackageInfoList",
width: "200px",
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",
width: '120px',
width: "120px",
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 {
loading: false,
mealList: [
{
upgradeGoodsName: 'test1',
upgradeGoodsName: "test1",
id: 1
}
],
......@@ -454,19 +448,23 @@ export default {
// params.meal = params.meal.join(',')
// }
if (params.customerLabel) {
params.customerLabelList = [{
labelId: params.customerLabel.labelId,
labelName: params.customerLabel.labelName,
level: 2,
parentId: params.customerLabel.parentId
}]
params.customerLabelList = [
{
labelId: params.customerLabel.labelId,
labelName: params.customerLabel.labelName,
level: 2,
parentId: params.customerLabel.parentId
}
]
delete params.customerLabel
}
if (params.receptionScene) {
params.receptionSceneInfoList = [{
receptionSceneId: params.receptionScene.id,
receptionSceneName: params.receptionScene.receptionSceneName
}]
params.receptionSceneInfoList = [
{
receptionSceneId: params.receptionScene.id,
receptionSceneName: params.receptionScene.receptionSceneName
}
]
delete params.receptionScene
}
return params
......@@ -491,11 +489,11 @@ export default {
})
},
goStatisticsPage(row) {
console.log(row)
this.$router.push({
name: "statisticsList",
query: {
id: row.id
// title: row.title
}
})
},
......@@ -593,7 +591,7 @@ export default {
},
focus(name) {
console.log(this.searchForm.scene)
if (this.searchForm.scene === '') {
if (this.searchForm.scene === "") {
return this.$message.error(`请先选择业务场景`)
}
// if (name == 'tag') {
......@@ -617,6 +615,7 @@ export default {
.merchant-num {
color: #185efe;
}
.circle {
display: inline-block;
border-radius: 50%;
......@@ -626,6 +625,7 @@ export default {
margin-right: 6px;
vertical-align: middle;
}
.merchant-wrap {
max-height: 400px;
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> -->
<el-tooltip class="item" effect="dark" placement="top">
<div slot="content" class="tag-name">
<div v-for="(item, index) in scope.scope.tagList.split(',')" :key="index">{{ item }}</div>
</div>
<div>
{{ scope.scope.tagList.split(',')[0] + (scope.scope.tagList.split(',').length == 1 ? '' : '...') + ' ' +
`(${scope.scope.tagList.split(',').length}条)` }}
</div>
</el-tooltip>
</template>
<template slot="courseList" scope="scope">
<el-tooltip v-for="(item, index) in scope.scope.courseList.split(',')" :key="index" class="item" effect="dark"
:content="item" placement="top">
<div class="one-line-ellipsis">
{{ item }}
</div>
</el-tooltip>
</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",
addHtml: "tagName",
},
{
label: "课程列表",
// minWidth: 144,
addHtml: "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")
: "-"
},
width: 140
},
{
label: "最后更新时间",
formatter: (cellValue) => {
return cellValue.updatedDate
? Util.dateFormate(cellValue.updatedDate, "YYYY-MM-DD HH:mm:ss")
: "-"
},
width: 140
}
]
}
}
},
created() { },
mounted() {
// this.getCustomerFileStatic()
},
methods: {
beforeSearchFn(type = 1) {
return new Promise((resolve, reject) => {
this.searchFormSearch = deepClone(this.searchForm)
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;
}
}
}
}
.tag-name {
max-height: 300px;
overflow-y: scroll;
}
</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, '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() {
// var validatorTagIds = (rule, value, callback) => {
// if (this.storeSearchForm?.configList && this.storeSearchForm.configList.length > 0) {
// callback()
// } else {
// callback(new Error("请选择员工"))
// }
// }
// var validatorForm = (rule, value, callback) => {
// if (this.storeSearchForm?.configList && this.storeSearchForm.configList.length > 0) {
// callback()
// } else {
// callback(new Error("请选择员工"))
// }
// }
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: true,
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)
if (this.formData.tagIds[pIdx].labelList.length == 0) {
this.formData.tagIds.splice(pIdx, 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.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="`学习任务情况 | ${detailInfo.staffName}`" :isShowFooter="false"
: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: "phoneNumber",
type: "input",
isClear: true,
maxlength: 11,
inputType: "number"
}
],
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,
prop: "readCount"
},
]
},
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.searchForm.taskId = this.routerInfo.id
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>
......@@ -12,8 +12,8 @@
<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>
<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">已选品牌
......@@ -22,12 +22,13 @@
<template v-if="checkList.length == 0">
<div class="no-data">暂无数据</div>
</template>
<template v-else>
<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 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> -->
</div>
</d2-dialog>
......@@ -108,7 +109,7 @@ export default {
});
}
});
// 过滤掉一级项中 id 存在于 childrenIds 中的项
return checkList.filter(item => !childrenIds.has(item.id));
},
......@@ -173,6 +174,7 @@ export default {
height: 324px;
overflow-y: auto;
width: 100%;
// margin-right: 20px;
.tree-title {
display: flex;
......@@ -199,11 +201,13 @@ export default {
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;
......
......@@ -5,13 +5,8 @@
<d2-container>
<!-- <div class="offline-account"> -->
<div class="header" slot="header" style="padding: 10px 20px">
<d2-search
ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="labelWidth"
:form-data="showFormData"
/>
<d2-search ref="showSearch" class="show-search" :search-form="searchForm" :label-width="labelWidth"
:form-data="showFormData" />
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
查询
......@@ -25,30 +20,20 @@
<d2-table-header>
<auth-button category="Button" />
</d2-table-header>
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<d2-table ref="recordTable" :get-list-api="getListApi" :search-form="searchFormSearch"
:table-params="tableParams" :before-search-fn="beforeSearchFn">
<div slot="auth-button" slot-scope="scope">
<span style="margin-right: 10px">
<auth-button :data="scope.scope" :show-btn-ids="['9130502']" />
</span>
<span
style="margin-right: 10px"
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"
>
<span style="margin-right: 10px"
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2 || scope.scope.contentType == 5">
<auth-button :data="scope.scope" :show-btn-ids="['9130503']" />
</span>
<span style="margin-right: 10px" v-if="scope.scope.sendStatus == 3">
<auth-button :data="scope.scope" :show-btn-ids="['9130504']" />
</span>
<span
style="margin-right: 10px"
v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2"
>
<span style="margin-right: 10px" v-if="scope.scope.sendStatus == 1 || scope.scope.sendStatus == 2">
<auth-button :data="scope.scope" :show-btn-ids="['9130505']" />
</span>
</div>
......@@ -242,7 +227,7 @@ export default {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {}
......@@ -326,7 +311,7 @@ export default {
goStatisticsPage(row) {
this.$router.push({
name: "statisticsPage",
name: row.contentType == 5 ? "massSendingStatisticsPage" : "statisticsPage",
query: {
id: row.id,
title: row.title
......
<!-- 员工群发统计页面 -->
<template>
<div class="performance-list-wrap">
<div class="title">
{{ title }}
<el-button size="small" @click="black">返回</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"
}
},
computed: {
title() {
return this.$route.query.title
}
},
mounted() {
if (this.$route.params.tabPane) {
this.activeName = this.$route.params.tabPane
this.tabName = this.$route.params.tabLabel
}
},
watch: {},
methods: {
black() {
this.$router.push({
path: "/staffMassSending"
})
},
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>
<d2-container class="container">
<div class="header" slot="header">
......@@ -6,7 +6,8 @@
ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData">
:form-data="showFormData"
>
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary" handle>
......@@ -25,7 +26,8 @@
:search-form="realSearchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
:before-search-fn="beforeSearchFn"
>
</d2-table>
</div>
</d2-container>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!