Commit 95de960f by 前端

配置

1 parent b851339c
...@@ -105,16 +105,16 @@ export function contentManagerTaskById(data) { ...@@ -105,16 +105,16 @@ export function contentManagerTaskById(data) {
// 查询接待素材商户配置 // 查询接待素材商户配置
export function materialPage(data) { export function materialPage(data) {
data.method = `dj.api.smartcarlife.recepiton.material.page` data.method = `dj.api.smartcarlife.recepiton.material.page`
return request(data, "POST", [], "", "/rop-dj-car-boutique/router") return request(data, "post", [], "", "/rop-dj-car-boutique/router")
} }
// 查询门店接待素材详情 // 查询门店接待素材详情
export function materialDetail(data) { export function materialDetail(data) {
data.method = `dj.api.smartcarlife.recepiton.material.merchant.detail` data.method = `dj.api.smartcarlife.recepiton.material.merchant.detail`
return request(data, "POST", [], "", "/rop-dj-car-boutique/router") return request(data, "post", [], "", "/rop-dj-car-boutique/router")
} }
// 保存更新门店接待素材 // 保存更新门店接待素材
export function recepitonUpdate(data) { export function recepitonUpdate(data) {
data.method = `dj.api.smartcarlife.recepiton.material.merchant.saveOrUpdate` data.method = `dj.api.smartcarlife.recepiton.material.merchant.saveOrUpdate`
return request(data, "POST", [], "", "/rop-dj-car-boutique/router") return request(data, "post", [], "", "/rop-dj-car-boutique/router")
} }
...@@ -16,8 +16,7 @@ const request = ( ...@@ -16,8 +16,7 @@ const request = (
params = {}, params = {},
method = RequestMethods.GET, method = RequestMethods.GET,
noSignAttr = [], noSignAttr = [],
options, options
rop
) => { ) => {
// 兼容线上dj和scrm appkey和secret不一样的情况 // 兼容线上dj和scrm appkey和secret不一样的情况
let apiName = "" let apiName = ""
...@@ -61,11 +60,7 @@ const request = ( ...@@ -61,11 +60,7 @@ const request = (
* mock - url = params.method * mock - url = params.method
* 调后端接口 - url = '' * 调后端接口 - url = ''
*/ */
let url = baseConfig[baseApiName].baseURL const url = baseConfig[baseApiName].baseURL
console.log(url, "url", rop)
if (rop) {
url = url.replace(/\/[^\/]+\/[^\/]+$/, rop)
}
// const url = "/api" // const url = "/api"
/** /**
* 调后端接口,请使用以下代码。 * 调后端接口,请使用以下代码。
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-09-06 09:49:46 * @Date: 2024-09-06 09:49:46
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-09-12 13:51:32 * @LastEditTime: 2024-09-12 21:50:30
* @FilePath: \dj-car-life-system\src\views\contentManager\packageConfig\components\addDialog.vue * @FilePath: \dj-car-life-system\src\views\contentManager\packageConfig\components\addDialog.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
请选择新增门店,新增门店的素材会复用默认门店的素材,可自定义修改 请选择新增门店,新增门店的素材会复用默认门店的素材,可自定义修改
</div> </div>
<el-select <el-select
filterable
class="form-select" class="form-select"
v-model="formData.merchantId" v-model="formData.merchantId"
placeholder="请选择" placeholder="请选择"
...@@ -46,17 +47,24 @@ export default { ...@@ -46,17 +47,24 @@ export default {
props: { props: {
dialogVisible: Boolean, dialogVisible: Boolean,
merchantList: { merchantList: {
type: Object, type: Array,
default: () => [] default: () => []
} }
}, },
methods: { methods: {
handleConfirm() { handleConfirm() {
const { merchantId } = this.formData const { merchantId } = this.formData
recepitonUpdate({ merchantId }).then((res) => { if (!merchantId) {
console.log(res) return this.$message.error("请选择门店")
}) }
this.handleClose() const merchantName = this.merchantList.find(
(i) => i.merchantId === merchantId
).merchantName
recepitonUpdate({ merchantId, configType: 0, merchantName }).then(
(res) => {
if (res) this.handleClose()
}
)
}, },
handleClose() { handleClose() {
this.$emit("dialogClose") this.$emit("dialogClose")
......
...@@ -51,7 +51,8 @@ ...@@ -51,7 +51,8 @@
<script> <script>
import { deepClone } from "@/common/util" import { deepClone } from "@/common/util"
import { materialPage, getMerchantList } from "@api/contentManager" import { materialPage } from "@api/contentManager"
import { getList } from "@api/merchant"
import addDialog from "./components/addDialog" import addDialog from "./components/addDialog"
export default { export default {
name: "StaffMassSendingIndex", name: "StaffMassSendingIndex",
...@@ -63,22 +64,21 @@ export default { ...@@ -63,22 +64,21 @@ export default {
dialogVisible: false, dialogVisible: false,
labelWidth: "100px", labelWidth: "100px",
searchForm: { searchForm: {
title: "", merchantId: "",
contentType: "", merchantName: ""
sendStatus: ""
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [ showFormData: [
{ {
label: "门店名称", label: "门店名称",
name: "title", name: "merchantName",
type: "input", type: "input",
maxlength: "20", maxlength: "20",
isClear: true isClear: true
}, },
{ {
label: "商户号", label: "商户号",
name: "title", name: "merchantId",
type: "input", type: "input",
maxlength: "20", maxlength: "20",
isClear: true isClear: true
...@@ -93,25 +93,31 @@ export default { ...@@ -93,25 +93,31 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "门店名称", label: "门店名称",
prop: "title" prop: "merchantName"
// width: '200px' // width: '200px'
}, },
{ {
label: "商户号", label: "商户号",
prop: "title" prop: "merchantId"
}, },
{ {
label: "业务场景", label: "业务场景",
prop: "title" prop: "businessScene"
}, },
{ {
label: "状态", label: "配置类型",
prop: "title" prop: "configType",
formatter: (cell) => {
return cell.configType == 0 ? "默认" : "自定义"
}
}, },
{ {
label: "配置类型", label: "状态",
prop: "contentType", prop: "status",
width: "100px" formatter: (cell) => {
return cell.status == 1 ? "启用 " : "禁用"
}
} }
] ]
} }
...@@ -122,9 +128,10 @@ export default { ...@@ -122,9 +128,10 @@ export default {
}, },
methods: { methods: {
getMerchantList() { getMerchantList() {
var params = { currentPage: 1, pageSize: 2000 } const params = { currentPage: 1, pageSize: 2000, scene: 1 }
getMerchantList(params).then((res) => { getList(params).then((res) => {
this.merchantList = res || [] console.log(res)
this.merchantList = res.list || []
}) })
}, },
beforeSearchFn() { beforeSearchFn() {
...@@ -140,10 +147,11 @@ export default { ...@@ -140,10 +147,11 @@ export default {
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
handleEdit(row) { handleEdit(row) {
const { id } = row
this.$router.push({ this.$router.push({
name: "packageEdit", name: "packageEdit",
query: { query: {
id: row.id id
} }
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!