|
...
|
...
|
@@ -108,6 +108,7 @@ |
|
|
|
v-model="scope.row.isRecommend"
|
|
|
|
active-value="1"
|
|
|
|
inactive-value="0"
|
|
|
|
@change="handleStatusChange(scope.row)"
|
|
|
|
></el-switch>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
...
|
...
|
@@ -353,6 +354,23 @@ const data = reactive({ |
|
|
|
|
|
|
|
const { queryParams, form, rules } = toRefs(data);
|
|
|
|
|
|
|
|
/** 应用是否推荐 */
|
|
|
|
function handleStatusChange(row) {
|
|
|
|
let text = row.isRecommend === "0" ? "取消推荐" : "推荐";
|
|
|
|
const typeIds = row.types.map((item) => item.id);
|
|
|
|
proxy.$modal
|
|
|
|
.confirm('确认要"' + text + '""' + row.title + '"吗?')
|
|
|
|
.then(function () {
|
|
|
|
return updateApp({ id: row.id, isRecommend: row.isRecommend, typeIds });
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
proxy.$modal.msgSuccess(text + "成功");
|
|
|
|
})
|
|
|
|
.catch(function () {
|
|
|
|
row.isRecommend = row.isRecommend === "0" ? "1" : "0";
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/** 查询广告列表 */
|
|
|
|
function getList() {
|
|
|
|
loading.value = true;
|
...
|
...
|
|