|
@@ -1365,6 +1365,12 @@
|
|
|
icon="el-icon-delete"
|
|
|
@click="deleteCourseMaConfig(scope.$index)"
|
|
|
>删除</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-setting"
|
|
|
+ @click="handleSwitchConfig(scope.row)"
|
|
|
+ >是否展示销售管理</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -1373,7 +1379,39 @@
|
|
|
<el-button type="primary" @click="submitCourseMaConfig">提 交</el-button>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="红包商户配置" name="redPacket.config" >
|
|
|
+
|
|
|
+ <!-- 开关配置对话框 -->
|
|
|
+ <el-dialog title="开关配置" :visible.sync="switchDialogVisible" width="500px" class="switch-dialog">
|
|
|
+ <el-form :model="switchForm" label-width="100px">
|
|
|
+ <el-form-item label="AppId">
|
|
|
+ <el-input v-model="switchForm.appId" :disabled="true"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="开关状态">
|
|
|
+ <el-switch
|
|
|
+ v-model="switchForm.switchStatus"
|
|
|
+ active-text="开启"
|
|
|
+ inactive-text="关闭"
|
|
|
+ active-value="001"
|
|
|
+ inactive-value="002">
|
|
|
+ </el-switch>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="配置信息" v-if="switchForm.configInfo">
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ :rows="4"
|
|
|
+ v-model="switchForm.configInfo"
|
|
|
+ :disabled="true">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="switchDialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitSwitchConfig">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+
|
|
|
+ <el-tab-pane label="红包商户配置" name="redPacket.config" >
|
|
|
<el-form ref="form19" :model="form19" label-width="150px">
|
|
|
<el-form-item label="红包接口类型" prop="isNew">
|
|
|
<el-radio-group v-model="form19.isNew">
|
|
@@ -1561,7 +1599,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getConfigByKey,updateConfigByKey, clearCache } from "@/api/system/config";
|
|
|
+import { getConfigByKey,updateConfigByKey, clearCache,updateIsTownOn } from "@/api/system/config";
|
|
|
import {listStore} from "@/api/his/storeProduct";
|
|
|
import { js } from "js-beautify";
|
|
|
import Material from '@/components/Material'
|
|
@@ -1589,6 +1627,11 @@ export default {
|
|
|
videoAccept:"video/*",
|
|
|
courseMaConfigLoading:false,
|
|
|
courseMaConfigList:[],
|
|
|
+ switchDialogVisible: false,
|
|
|
+ switchForm: {
|
|
|
+ appId: '',
|
|
|
+ switchStatus: '001',
|
|
|
+ },
|
|
|
deliveryGift:{
|
|
|
open:false,
|
|
|
title:"商品选择"
|
|
@@ -1737,6 +1780,53 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
+ // 处理开关配置
|
|
|
+ handleSwitchConfig(row) {
|
|
|
+ this.switchForm.appId = row.appid;
|
|
|
+ this.switchForm.switchStatus = "001"; // 默认关闭状态
|
|
|
+
|
|
|
+ // 调用接口获取开关状态
|
|
|
+ this.getSwitchConfig(row.appid);
|
|
|
+ this.switchDialogVisible = true;
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取开关配置
|
|
|
+ getSwitchConfig(appId) {
|
|
|
+ const params = {
|
|
|
+ appId: this.switchForm.appId
|
|
|
+ };
|
|
|
+ updateIsTownOn(params).then(response=>{
|
|
|
+ if (response.code === 200) {
|
|
|
+ if ( response.date){
|
|
|
+ this.switchForm.switchStatus = response.date;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error('获取配置失败: ' + response.msg);
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ this.$message.error('请求失败: ' + error.message);
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 提交开关配置
|
|
|
+ submitSwitchConfig() {
|
|
|
+ const params = {
|
|
|
+ appId: this.switchForm.appId,
|
|
|
+ bock: this.switchForm.switchStatus
|
|
|
+ };
|
|
|
+ updateIsTownOn(params).then(response=>{
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.$message.success('配置更新成功');
|
|
|
+ this.switchDialogVisible = false;
|
|
|
+ } else {
|
|
|
+ this.$message.error('更新失败: ' + response.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
handleCityChange(value) {
|
|
|
// console.log(this.$refs.citySelect,this.$refs.citySelect[0])
|
|
|
var nodes=this.$refs.citySelect[value].getCheckedNodes();
|