Commit 0822f25b by Sixong.Zhu

update style

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