Commit f5dd8918 by panjiangyi

格式化create-chat

parent 29d2166f
Showing with 7 additions and 2 deletions
...@@ -21,10 +21,11 @@ ...@@ -21,10 +21,11 @@
</el-dialog> </el-dialog>
</template> </template>
<script lang="ts"> <script lang="ts">
import type { ListEasy, } from "uniplat-sdk";
import { Component, Vue } from "vue-property-decorator"; import { Component, Vue } from "vue-property-decorator";
import { ChatStore, chatStore } from "@/customer-service/store/model"; import { ChatStore, chatStore } from "@/customer-service/store/model";
import type { List, ListEasy, ListTypes } from "uniplat-sdk"; import chat from "@/customer-service/xim/index";
import chat from "@/customer-service/xim/index"
type User = { type User = {
id: string; id: string;
name: string; name: string;
...@@ -34,8 +35,10 @@ type ThenArg<T> = T extends PromiseLike<infer U> ? U : T; ...@@ -34,8 +35,10 @@ type ThenArg<T> = T extends PromiseLike<infer U> ? U : T;
export default class ChatCreator extends Vue { export default class ChatCreator extends Vue {
@chatStore.State(ChatStore.STATE_CHAT_CREATOR_VISIBLE) @chatStore.State(ChatStore.STATE_CHAT_CREATOR_VISIBLE)
private readonly visible!: ChatStore.STATE_CHAT_CREATOR_VISIBLE; private readonly visible!: ChatStore.STATE_CHAT_CREATOR_VISIBLE;
@chatStore.Mutation(ChatStore.MUTATION_HIDE_CHAT_CREATOR) @chatStore.Mutation(ChatStore.MUTATION_HIDE_CHAT_CREATOR)
private readonly hide!: ChatStore.MUTATION_HIDE_CHAT_CREATOR; private readonly hide!: ChatStore.MUTATION_HIDE_CHAT_CREATOR;
@chatStore.Action(ChatStore.ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN) @chatStore.Action(ChatStore.ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN)
private readonly _createChat!: ChatStore.ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN; private readonly _createChat!: ChatStore.ACTION_CREATE_NEW_CHAT_BY_SERVICE_MAN;
...@@ -44,6 +47,7 @@ export default class ChatCreator extends Vue { ...@@ -44,6 +47,7 @@ export default class ChatCreator extends Vue {
id: any; id: any;
name: any; name: any;
}[] = []; }[] = [];
private getList!: ThenArg<ReturnType<ListEasy["query"]>>["getList"]; private getList!: ThenArg<ReturnType<ListEasy["query"]>>["getList"];
public async created() { public async created() {
...@@ -55,6 +59,7 @@ export default class ChatCreator extends Vue { ...@@ -55,6 +59,7 @@ export default class ChatCreator extends Vue {
this.getList = getList; this.getList = getList;
this.userList = this.exactUserList(pageData.rows); this.userList = this.exactUserList(pageData.rows);
} }
private exactUserList(rows: any[]) { private exactUserList(rows: any[]) {
return rows.map((k) => { return rows.map((k) => {
return { return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment