修改专题模块
This commit is contained in:
@@ -104,3 +104,11 @@ export async function removeTopicModuleOption(id) {
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function updateTopicModuleStatus(data) {
|
||||
const res = await request.put('/sytopic/module/status', data);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
@@ -139,6 +139,12 @@
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="moduleType === 6">
|
||||
<el-form-item label="显示时间标题:" prop="showBtn">
|
||||
<el-radio-group v-model="form.showBtn">
|
||||
<el-radio label="0" key="0">否</el-radio>
|
||||
<el-radio label="1" key="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="文章内容:">
|
||||
<tinymce-editor
|
||||
:init="editoption"
|
||||
|
||||
@@ -74,6 +74,14 @@
|
||||
</el-link>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
icon="el-icon-edit"
|
||||
@click="updateStatus(row)"
|
||||
>
|
||||
{{ row.status === '1' ? '显示' : '隐藏' }}
|
||||
</el-link>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</el-card>
|
||||
@@ -100,7 +108,8 @@
|
||||
import {
|
||||
pageSyTopicModule,
|
||||
pageTopicModuleTypes,
|
||||
removeTopicModule
|
||||
removeTopicModule,
|
||||
updateTopicModuleStatus
|
||||
} from '@/api/sytopic/module';
|
||||
import ModuleEdit from './components/module-edit.vue';
|
||||
import ModuleOptionEdit from './components/module-option-edit.vue';
|
||||
@@ -258,6 +267,21 @@
|
||||
},
|
||||
showQrCode() {
|
||||
this.showQr = true;
|
||||
},
|
||||
updateStatus(row) {
|
||||
console.log(row);
|
||||
let status = 1;
|
||||
if (row.status === '1') {
|
||||
status = 0;
|
||||
}
|
||||
updateTopicModuleStatus({ id: row.id, status: status })
|
||||
.then((msg) => {
|
||||
this.$message.success(msg);
|
||||
this.reload();
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in New Issue
Block a user