Commit 0822f25b by Sixong.Zhu

update style

parent d249e5f0
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
'justify-content-center': isWithdrawMessage, 'justify-content-center': isWithdrawMessage,
'offset-bottom': matchKeywords, 'offset-bottom': matchKeywords,
}" }"
@mouseenter="hoverWithdraw"
> >
<div class="msg-content" :class="{ 'algin-left': !isMyMessage }"> <div class="msg-content" :class="{ 'algin-left': !isMyMessage }">
<div <div
...@@ -101,7 +102,6 @@ ...@@ -101,7 +102,6 @@
!isQuestionAnswerMessage && !isQuestionAnswerMessage &&
isChatMember isChatMember
" "
@mouseenter="hoverWithdraw"
@click="withdraw" @click="withdraw"
>撤回此消息</span >撤回此消息</span
> >
...@@ -171,6 +171,7 @@ ...@@ -171,6 +171,7 @@
import Xim from "@/customer-service/xim"; import Xim from "@/customer-service/xim";
const twoMinutes = 2 * 60 * 1000; const twoMinutes = 2 * 60 * 1000;
const twoHours = 2 * 60 * 60 * 1000;
const messageMapping = new Map<dto.MessageType, string>([ const messageMapping = new Map<dto.MessageType, string>([
[dto.MessageType.Image, "image-message"], [dto.MessageType.Image, "image-message"],
...@@ -266,7 +267,10 @@ ...@@ -266,7 +267,10 @@
private get canWithdraw() { private get canWithdraw() {
if (this.backend && this.data) { if (this.backend && this.data) {
return new Date().valueOf() - this.data.ts * 1000 < twoMinutes; if (this.needReadTip) {
return new Date().valueOf() - this.data.ts * 1000 < twoMinutes;
}
return new Date().valueOf() - this.data.ts * 1000 < twoHours;
} }
return false; return false;
} }
...@@ -276,7 +280,8 @@ ...@@ -276,7 +280,8 @@
this.data.type !== dto.MessageType.Pay && this.data.type !== dto.MessageType.Pay &&
this.data.type !== dto.MessageType.Refund && this.data.type !== dto.MessageType.Refund &&
this.data.type !== dto.MessageType.PayV1 && this.data.type !== dto.MessageType.PayV1 &&
this.data.type !== dto.MessageType.RefundV1 this.data.type !== dto.MessageType.RefundV1 &&
this.data.type !== dto.MessageType.PayResult
); );
} }
...@@ -496,8 +501,12 @@ ...@@ -496,8 +501,12 @@
} }
private hoverWithdraw() { private hoverWithdraw() {
this.isWithdraw = if (!this.isWithdraw || !this.isMyMessage) {
new Date().valueOf() - this.data.ts * 1000 < twoMinutes; return;
}
this.isWithdraw = this.needReadTip
? new Date().valueOf() - this.data.ts * 1000 < twoMinutes
: new Date().valueOf() - this.data.ts * 1000 < twoHours;
} }
private openReaderList(e: MouseEvent) { private openReaderList(e: MouseEvent) {
......
...@@ -135,6 +135,7 @@ export interface OrderPayItem { ...@@ -135,6 +135,7 @@ export interface OrderPayItem {
OpenningBankName?: string; OpenningBankName?: string;
bankAccountNo?: string; bankAccountNo?: string;
paymentItemId?: number; paymentItemId?: number;
paymentDate: string;
} }
export interface OrderComment { export interface OrderComment {
...@@ -163,6 +164,7 @@ export const orderPayItemPredict = { ...@@ -163,6 +164,7 @@ export const orderPayItemPredict = {
OpenningBankName: "ProviderHandleId#ServiceProviderBank.OpenningBankName", OpenningBankName: "ProviderHandleId#ServiceProviderBank.OpenningBankName",
bankAccountNo: "ProviderHandleId#ServiceProviderBank.AccountNo", bankAccountNo: "ProviderHandleId#ServiceProviderBank.AccountNo",
paymentItemId: "PaymentItemId", paymentItemId: "PaymentItemId",
paymentDate: "PaymentDate",
}; };
export const enum ChatOpenDirection { export const enum ChatOpenDirection {
...@@ -190,6 +192,8 @@ export const enum OperationType { ...@@ -190,6 +192,8 @@ export const enum OperationType {
} }
export interface UploadImageItem { export interface UploadImageItem {
id: number;
v: number;
url: string; url: string;
fileName: string; fileName: string;
time: string; time: string;
......
...@@ -17,6 +17,7 @@ class OrderService { ...@@ -17,6 +17,7 @@ class OrderService {
public readonly generalOrder = "general_order_info"; public readonly generalOrder = "general_order_info";
public readonly generalOrderPaymentModel = "general_order_payment_info"; public readonly generalOrderPaymentModel = "general_order_payment_info";
private readonly commentModel = "uniplat_model_remark@general_order"; private readonly commentModel = "uniplat_model_remark@general_order";
private readonly fileModel = "general_order_payment_file_info";
private readonly handler = new UniplatSdkExtender(); private readonly handler = new UniplatSdkExtender();
private innerSdk: UniplatSdk | null = null; private innerSdk: UniplatSdk | null = null;
...@@ -171,7 +172,7 @@ class OrderService { ...@@ -171,7 +172,7 @@ class OrderService {
public getImages4Payment(payment: number) { public getImages4Payment(payment: number) {
return this.getSdk() return this.getSdk()
.model("general_order_payment_file_info") .model(this.fileModel)
.list() .list()
.addPrefilter({ PaymentId: payment }) .addPrefilter({ PaymentId: payment })
.query({ item_size: 10, pageIndex: 1 }) .query({ item_size: 10, pageIndex: 1 })
...@@ -181,10 +182,23 @@ class OrderService { ...@@ -181,10 +182,23 @@ class OrderService {
fileSize: "FileSize", fileSize: "FileSize",
fileName: "FileName", fileName: "FileName",
url: "Url", url: "Url",
id: "ID",
v: "uniplat_version",
}) })
); );
} }
public deleteImage(payment: number, image: number, v: number) {
return this.getSdk()
.model(this.fileModel)
.action("delete")
.updateInitialParams({
selected_list: [{ v, id: image }],
prefilters: [{ property: "PaymentId", value: payment }],
})
.execute();
}
public buildOrder(o: metaRow) { public buildOrder(o: metaRow) {
return this.handler.buildRow<OrderTableListItem>(o, orderPredict); return this.handler.buildRow<OrderTableListItem>(o, orderPredict);
} }
......
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