|
@@ -57,15 +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="200" 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>
|
|
|
+ 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> -->
|
|
@@ -299,6 +305,7 @@ import tableTitle from './components/tableTitle';
|
|
|
//引入公用样式
|
|
|
import '@/styles/global.less';
|
|
|
import InputTag from '@/components/InputTag'
|
|
|
+import data from '../pdf/content';
|
|
|
export default {
|
|
|
components: {
|
|
|
CityCascader, //城市级联选择器
|
|
@@ -448,6 +455,7 @@ export default {
|
|
|
// });
|
|
|
this.tableData = newData; //给与内容
|
|
|
this.allCount = res.data.count; //给与总条数
|
|
|
+ // console.log('tableData',tableData);
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
@@ -482,13 +490,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();
|