|
@@ -57,13 +57,21 @@
|
|
|
<!-- <el-table-column prop="city_name" label="行政区划"></el-table-column> -->
|
|
|
<el-table-column prop="created_at" label="创建时间"></el-table-column>
|
|
|
<el-table-column prop="updated_at" label="修改时间"></el-table-column>
|
|
|
- <el-table-column fixed="right" label="操作" width="240" header-align="center">
|
|
|
+ <el-table-column prop="status" label="网站状态" width="">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.status" :active-value="1" :inactive-value="0"
|
|
|
+ @change="upRow(scope.row.id, scope.row.status)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" width="150" header-align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="listBtnBox">
|
|
|
- <div class="listDeleteBtn" @click="deleteData(scope.row.id, tableData)"><i
|
|
|
- class="el-icon-delete"></i>删除</div>
|
|
|
+ <!-- <div class="listDeleteBtn" @click="deleteData(scope.row.id, tableData)"><i
|
|
|
+ class="el-icon-delete"></i>删除</div> -->
|
|
|
<div class="listEditBtn" @click="getDataMain(scope.row.id, tableData)"><i
|
|
|
class="el-icon-edit-outline"></i>编辑</div>
|
|
|
+ <!-- <div class="listUpBtn" @click="cloneWebsite(scope.row.id, tableData)"><i
|
|
|
+ class="el-icon-copy-document"></i>克隆</div> -->
|
|
|
<!-- <div class="listMainBtn" @click="creatWebsite(scope.row.id)"><i class="el-icon-brush"></i>模板</div> -->
|
|
|
</div>
|
|
|
<!-- <div class="listMainBtn"><i class="el-icon-view"></i>详情</div> -->
|
|
@@ -480,13 +488,33 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- //1.3 列表内容分页
|
|
|
+ //1.3 修改用户状态
|
|
|
+ upRow(id, status) {
|
|
|
+ let data = {
|
|
|
+ id: id,
|
|
|
+ status: status
|
|
|
+ }
|
|
|
+ this.$store.dispatch('pool/updateWebsiteStatus',data).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '网站状态已修改!'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '已取消修改'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //1.4 列表内容分页
|
|
|
//直接跳转
|
|
|
handleSizeChange(val) {
|
|
|
this.getApiData.page = val;
|
|
|
this.getData();
|
|
|
},
|
|
|
- //1.4 点击分页
|
|
|
+ //1.5 点击分页
|
|
|
handleCurrentChange(val) {
|
|
|
this.getApiData.page = val;
|
|
|
this.getData();
|
|
@@ -907,6 +935,33 @@ export default {
|
|
|
this.form.keywords = newTags.join(',');
|
|
|
},
|
|
|
//编辑旧网站 end ------------------------------------------------------------>
|
|
|
+ //克隆网站
|
|
|
+ cloneWebsite(id) {
|
|
|
+ this.$confirm('克隆后,将生成一个一摸一样的网站,确定吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ console.log("当前克隆:" + id)
|
|
|
+ this.$store.dispatch('pool/cloneWebsite', { website_id: id }).then(res => {
|
|
|
+ this.getData();
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '克隆成功!'
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '网络错误,请重试!'
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '已取消克隆'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
//1.获得初始数据
|