|
@@ -8,7 +8,13 @@
|
|
|
<cButton :isAdd="false"> </cButton>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="thr">
|
|
|
- <cTable :fields="fields" :opera="opera" :list="list" @query="search" @chat="toChat" :total="total"> </cTable>
|
|
|
+ <cTable :fields="fields" :opera="opera" :list="list" @query="search" @chat="toChat" :total="total">
|
|
|
+ <template #is_read="{ item, row }">
|
|
|
+ <template v-if="item.model === 'is_read'">
|
|
|
+ <span :class="[row.is_read == '未读' ? 'text' : '']">{{ row.is_read }}</span>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </cTable>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -42,7 +48,7 @@ let searchForm: Ref<any> = ref({});
|
|
|
|
|
|
const search = async (e: { skip: number; limit: number }) => {
|
|
|
const info = { skip: e.skip, limit: e.limit, ...searchForm.value };
|
|
|
- const res: IQueryResult = await store.query(info);
|
|
|
+ const res: IQueryResult = await store.user(info);
|
|
|
if (res.errcode == '0') {
|
|
|
list.value = res.data;
|
|
|
total.value = res.total;
|
|
@@ -61,7 +67,8 @@ let fields: Ref<any[]> = ref([
|
|
|
{ label: '昵称', model: 'nickname', isSearch: true },
|
|
|
{ label: '姓名', model: 'name', isSearch: true },
|
|
|
{ label: '身份证号', model: 'card', isSearch: true },
|
|
|
- { label: '电话', model: 'phone', isSearch: true }
|
|
|
+ { label: '电话', model: 'phone', isSearch: true },
|
|
|
+ { label: '是否已读', model: 'is_read', custom: true }
|
|
|
]);
|
|
|
// 操作
|
|
|
let opera: Ref<any[]> = ref([{ label: '聊天记录', method: 'chat' }]);
|
|
@@ -71,4 +78,12 @@ const toChat = async (data: any) => {
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style scoped></style>
|
|
|
+<style scoped lang="scss">
|
|
|
+.main {
|
|
|
+ .thr {
|
|
|
+ .text {
|
|
|
+ color: #f10000;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|