|
|
|
@ -6,8 +6,11 @@ |
|
|
|
@keyup.enter.native="conditionQuery" |
|
|
|
@keyup.enter.native="conditionQuery" |
|
|
|
> |
|
|
|
> |
|
|
|
<!--查询条件--> |
|
|
|
<!--查询条件--> |
|
|
|
<el-form-item label="姓名" prop="name"> |
|
|
|
<el-form-item label="openid" prop="openid"> |
|
|
|
<el-input v-model="condition.name" placeholder="请输入" clearable/> |
|
|
|
<el-input v-model="condition.openid" placeholder="openid" clearable/> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="unionid" prop="unionid"> |
|
|
|
|
|
|
|
<el-input v-model="condition.unionid" placeholder="unionid" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<!-- End 查询条件 --> |
|
|
|
<!-- End 查询条件 --> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
@ -21,8 +24,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
<!-- 表格操作 --> |
|
|
|
<!-- 表格操作 --> |
|
|
|
<el-card class="table-operate-container" shadow="never"> |
|
|
|
<el-card class="table-operate-container" shadow="never"> |
|
|
|
<el-button size="mini" icon="el-icon-plus" type="primary" plain @click="addRow">添加</el-button> |
|
|
|
<!-- <el-button size="mini" icon="el-icon-plus" type="primary" plain @click="addRow">添加</el-button>--> |
|
|
|
<el-button :disabled="!hasSelection" type="danger" size="mini" @click="removeBatchRows">批量删除 |
|
|
|
<!-- <el-button :disabled="!hasSelection" type="danger" size="mini" @click="removeBatchRows">批量删除--> |
|
|
|
|
|
|
|
<!-- </el-button>--> |
|
|
|
|
|
|
|
<el-button type="danger" size="mini" @click="initUserList"> |
|
|
|
|
|
|
|
初始化 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
@ -34,15 +40,16 @@ |
|
|
|
> |
|
|
|
> |
|
|
|
<el-table-column type="selection" width="40" align="center"/> |
|
|
|
<el-table-column type="selection" width="40" align="center"/> |
|
|
|
<el-table-column type="index" label="序号" width="60" align="center"/> |
|
|
|
<el-table-column type="index" label="序号" width="60" align="center"/> |
|
|
|
<el-table-column property="name" label="姓名" min-width="25%" align="center"/> |
|
|
|
<el-table-column property="openid" label="openid" min-width="25%" align="center"/> |
|
|
|
<el-table-column property="attr1" label="属性1" min-width="25%" align="center"/> |
|
|
|
<el-table-column property="unionid" label="unionid" min-width="25%" align="center"/> |
|
|
|
<el-table-column property="attr2" label="属性2" min-width="25%" align="center"/> |
|
|
|
<el-table-column property="subscribe_scene" label="订阅来源" width="120" align="center"/> |
|
|
|
<el-table-column property="updatedTime" label="更新时间" min-width="25%" align="center"/> |
|
|
|
<el-table-column property="updated_time" label="更新时间" width="200" align="center"/> |
|
|
|
<el-table-column property="createdTime" label="创建时间" min-width="25%" align="center"/> |
|
|
|
<el-table-column property="created_time" label="创建时间" width="200" align="center"/> |
|
|
|
<el-table-column label="操作" width="180" align="center"> |
|
|
|
<el-table-column label="操作" width="210" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button size="mini" @click.stop="handleEdit(scope.row)">编辑</el-button> |
|
|
|
<!-- <el-button size="mini" @click.stop="handleEdit(scope.row)">编辑</el-button>--> |
|
|
|
<el-button type="danger" plain size="mini" @click.stop="handleRemove(scope.row)">删除</el-button> |
|
|
|
<el-button size="mini" @click.stop="refreshPull(scope.row)">重新拉取</el-button> |
|
|
|
|
|
|
|
<!-- <el-button type="danger" plain size="mini" @click.stop="handleRemove(scope.row)">删除</el-button>--> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
@ -60,15 +67,15 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- End 表格 --> |
|
|
|
<!-- End 表格 --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 编辑弹窗 --> |
|
|
|
<!-- <!– 编辑弹窗 –>--> |
|
|
|
<edit-dialog v-if="showDialog" :row="editRowData" :show.sync="showDialog" :is-add="isAddDialog" |
|
|
|
<!-- <edit-dialog v-if="showDialog" :row="editRowData" :show.sync="showDialog" :is-add="isAddDialog"--> |
|
|
|
@saved="conditionQuery" |
|
|
|
<!-- @saved="conditionQuery"--> |
|
|
|
/> |
|
|
|
<!-- />--> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { page, remove } from '@/api/demo' |
|
|
|
import {initUserList, page, refreshOpenId} from '@/api/demo' |
|
|
|
import editDialog from './edit' |
|
|
|
import editDialog from './edit' |
|
|
|
/** |
|
|
|
/** |
|
|
|
* @version 2.0 |
|
|
|
* @version 2.0 |
|
|
|
@ -76,7 +83,8 @@ import editDialog from './edit' |
|
|
|
|
|
|
|
|
|
|
|
/* Base */ |
|
|
|
/* Base */ |
|
|
|
const default_condition = { |
|
|
|
const default_condition = { |
|
|
|
name: '', |
|
|
|
openid: '', |
|
|
|
|
|
|
|
unionid: '', |
|
|
|
pageNumber: 1, |
|
|
|
pageNumber: 1, |
|
|
|
pageSize: 10 |
|
|
|
pageSize: 10 |
|
|
|
} |
|
|
|
} |
|
|
|
@ -122,6 +130,66 @@ export default { |
|
|
|
this.conditionQuery() |
|
|
|
this.conditionQuery() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
initUserList() { |
|
|
|
|
|
|
|
let title = '初始化关注列表?该操作会从公众号读取关注用户覆盖当前数据库' |
|
|
|
|
|
|
|
this.$confirm(title, '提示', { |
|
|
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
const loading = this.$loading({ |
|
|
|
|
|
|
|
background: this.$elementGlobal.loadingBackground |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
initUserList().then(r => { |
|
|
|
|
|
|
|
loading.close() |
|
|
|
|
|
|
|
if (r.data) { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: 'success', |
|
|
|
|
|
|
|
message: '操作成功!' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: 'error', |
|
|
|
|
|
|
|
message: '操作失败!' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.conditionQuery() |
|
|
|
|
|
|
|
}).catch(e => { |
|
|
|
|
|
|
|
loading.close() |
|
|
|
|
|
|
|
console.log(e) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
refreshPull(row) { |
|
|
|
|
|
|
|
let title = '重新拉取该用户的数据?该操作会从公众号读取关注用户覆盖当前数据' |
|
|
|
|
|
|
|
this.$confirm(title, '提示', { |
|
|
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
const loading = this.$loading({ |
|
|
|
|
|
|
|
background: this.$elementGlobal.loadingBackground |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
refreshOpenId(row.openid).then(r => { |
|
|
|
|
|
|
|
loading.close() |
|
|
|
|
|
|
|
if (r.data) { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: 'success', |
|
|
|
|
|
|
|
message: '操作成功!' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
|
|
|
|
type: 'error', |
|
|
|
|
|
|
|
message: '操作失败!' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.conditionQuery() |
|
|
|
|
|
|
|
}).catch(e => { |
|
|
|
|
|
|
|
loading.close() |
|
|
|
|
|
|
|
console.log(e) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
/* Base */ |
|
|
|
/* Base */ |
|
|
|
addRow() { |
|
|
|
addRow() { |
|
|
|
// 表格操作 - 添加 |
|
|
|
// 表格操作 - 添加 |
|
|
|
|