Commit 7720e48d by 前端

平板配置接口

1 parent ae12efc0
...@@ -101,3 +101,20 @@ export function contentManagerTaskById(data) { ...@@ -101,3 +101,20 @@ export function contentManagerTaskById(data) {
data.method = `dj.api.smartcarlife.contentManagerTask.getById` data.method = `dj.api.smartcarlife.contentManagerTask.getById`
return request(data, "POST") return request(data, "POST")
} }
// 查询接待素材商户配置
export function materialPage(data) {
data.method = `dj.api.smartcarlife.recepiton.material.page`
return request(data, "POST", [], "", "/rop-dj-car-boutique/router")
}
// 查询门店接待素材详情
export function materialDetail(data) {
data.method = `dj.api.smartcarlife.recepiton.material.merchant.detail`
return request(data, "POST", [], "", "/rop-dj-car-boutique/router")
}
// 保存更新门店接待素材
export function recepitonUpdate(data) {
data.method = `dj.api.smartcarlife.recepiton.material.merchant.saveOrUpdate`
return request(data, "POST", [], "", "/rop-dj-car-boutique/router")
}
...@@ -16,7 +16,8 @@ const request = ( ...@@ -16,7 +16,8 @@ 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 = ""
...@@ -60,7 +61,11 @@ const request = ( ...@@ -60,7 +61,11 @@ const request = (
* mock - url = params.method * mock - url = params.method
* 调后端接口 - url = '' * 调后端接口 - url = ''
*/ */
const url = baseConfig[baseApiName].baseURL let url = baseConfig[baseApiName].baseURL
console.log(url, "url", rop)
if (rop) {
url = url.replace(/\/[^\/]+\/[^\/]+$/, rop)
}
// const url = "/api" // const url = "/api"
/** /**
* 调后端接口,请使用以下代码。 * 调后端接口,请使用以下代码。
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-09-06 09:49:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-09-12 13:51:32
* @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
-->
<!-- 月度库存结算单弹窗 --> <!-- 月度库存结算单弹窗 -->
<template> <template>
<d2-dialog <d2-dialog
...@@ -13,38 +21,41 @@ ...@@ -13,38 +21,41 @@
</div> </div>
<el-select <el-select
class="form-select" class="form-select"
v-model="formData.scene" v-model="formData.merchantId"
placeholder="请选择" placeholder="请选择"
> >
<el-option <el-option
v-for="(i, indx) in sceneList" v-for="(i, indx) in merchantList"
:key="indx" :key="i.merchantId"
:label="i.label" :label="i.merchantName"
:value="i.id" :value="i.merchantId"
></el-option> ></el-option>
</el-select> </el-select>
</d2-dialog> </d2-dialog>
</template> </template>
<script> <script>
import { recepitonUpdate } from "@api/contentManager"
export default { export default {
name: "addDialog", name: "addDialog",
data() { data() {
return { return {
sceneList: [
{
label: "1",
id: "1"
}
],
formData: {} formData: {}
} }
}, },
props: { props: {
dialogVisible: Boolean dialogVisible: Boolean,
merchantList: {
type: Object,
default: () => []
}
}, },
methods: { methods: {
handleConfirm() { handleConfirm() {
const { merchantId } = this.formData
recepitonUpdate({ merchantId }).then((res) => {
console.log(res)
})
this.handleClose() this.handleClose()
}, },
handleClose() { handleClose() {
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
<add-dialog <add-dialog
:dialogVisible="dialogVisible" :dialogVisible="dialogVisible"
v-if="dialogVisible" v-if="dialogVisible"
:merchantList="merchantList"
@dialogClose="addDialogClose" @dialogClose="addDialogClose"
/> />
</div> </div>
...@@ -50,7 +51,7 @@ ...@@ -50,7 +51,7 @@
<script> <script>
import { deepClone } from "@/common/util" import { deepClone } from "@/common/util"
import { contentManagerTaskPage } from "@api/contentManager" import { materialPage, getMerchantList } from "@api/contentManager"
import addDialog from "./components/addDialog" import addDialog from "./components/addDialog"
export default { export default {
name: "StaffMassSendingIndex", name: "StaffMassSendingIndex",
...@@ -83,7 +84,7 @@ export default { ...@@ -83,7 +84,7 @@ export default {
isClear: true isClear: true
} }
], ],
getListApi: contentManagerTaskPage, getListApi: materialPage,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list", listName: "list",
...@@ -116,8 +117,16 @@ export default { ...@@ -116,8 +117,16 @@ export default {
} }
} }
}, },
mounted() {
this.getMerchantList()
},
methods: { methods: {
getMerchantList() {
var params = { currentPage: 1, pageSize: 2000 }
getMerchantList(params).then((res) => {
this.merchantList = res || []
})
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!