perf: 优化工单处理提示消息页面

pull/12229/head
wangruidong 2023-11-29 11:39:20 +08:00 committed by Bryan
parent eee41008cc
commit 3cd22f05d2
2 changed files with 117 additions and 60 deletions

View File

@ -1,34 +1,31 @@
{% load i18n %} {% load i18n %}
<div class="ticket-container"> <div class="ticket-container">
<p class="title"> <h1 class="title">
{{ title | safe }} {{ title | safe }}
</p> </h1>
<div> <div>
{% for child in content %} {% for child in content %}
<h4 style="color: #333; <div class="card">
font-size: 1.1em; <h2 class="child_title">{{ child.title }}</h2>
margin-top: 20px;
border-bottom: 1px solid #ccc;
padding-bottom: 5px;
background-color: #f7f7f7;">{{ child.title }}</h4>
{% for item in child.content %} {% for item in child.content %}
<li style="overflow: hidden; list-style-type: none;"> <p class="field-group">
<span style="color: #737373;line-height: 2.5em;">{{ item.title }} </span> <span class="field-name"><strong>{{ item.title }}:</strong></span>
<span style="float: right; width: 90%;line-height: 2.5em;">{{ item.value }}</span> <span class="field-value">{{ item.value }}</span>
</li> </p>
{% endfor %}
{% endfor %} {% endfor %}
</div> </div>
<br> {% endfor %}
<div> </div>
<a href="{{ ticket_detail_url }}" target="_blank"> <div class="action_group">
<a class="view-link" href="{{ ticket_detail_url }}" target="_blank" rel="noopener">
{% trans 'View details' %} {% trans 'View details' %}
</a> </a>
<br> <br>
{% if ticket_approval_url %} {% if ticket_approval_url %}
<a href="{{ ticket_approval_url }}" target="_blank"> <a href="{{ ticket_approval_url }}" target="_blank" rel="noopener">
{% trans 'Direct approval' %} {% trans 'Direct approval' %}
</a> </a>
{% endif %} {% endif %}
</div> </div>
<br>
</div> </div>

View File

@ -7,20 +7,19 @@
{% block content %} {% block content %}
<div class="col-lg-12"> <div class="col-lg-12">
<div class="col-lg-6"> <div class="col-lg-6">
<div class="ibox-content"> <div class="ticket-container">
<h2 class="font-bold" style="display: inline">{% trans 'Ticket information' %}</h2> <h2 class="font-bold" style="display: inline-block">{% trans 'Ticket information' %}</h2>
<h1></h1>
<div>
{% for child in content %} {% for child in content %}
<h2>{{ child.title }}</h2> <div class="card">
<hr> <h2 class="child_title">{{ child.title }}</h2>
{% for item in child.content %} {% for item in child.content %}
<li style="list-style-type:none"> <p class="field-group">
<b>{{ item.title }}: </b> {{ item.value }} <span class="field-name"><strong>{{ item.title }}:</strong></span>
</li> <span class="field-value">{{ item.value }}</span>
{% endfor %} </p>
{% endfor %} {% endfor %}
</div> </div>
{% endfor %}
</div> </div>
</div> </div>
<div class="col-lg-6"> <div class="col-lg-6">
@ -54,6 +53,67 @@
</div> </div>
</div> </div>
<style> <style>
.font-bold {
margin: 24px 0 0 24px
}
.ticket-container {
flex-shrink: 0;
border-radius: 4px;
background: #FFF;
font-style: normal;
font-weight: 400;
line-height: 24px; /* 150% */
.card {
.child_title {
padding-top: 16px;
margin: 0 0 12px 16px;
display: inline-flex;
flex-direction: column;
align-items: flex-start;
color: #1F2329;
font-size: 16px;
font-style: normal;
font-weight: 500;
}
@media (max-width: 400px) {
margin: 8px
}
margin: 24px 0 0 24px;
width: 95%;
display: inline-block;
border-radius: 4px;
background: #F5F6F7;
}
.card:last-child {
margin-bottom: 24px;
}
.field-group {
font-size: 14px;
padding-inline-start: 0;
margin: 0;
width: 95%;
.field-name {
margin: 4px 0 4px 16px;
color: #646A73;
display: inline-block;
:is(strong) {
font-weight: 400 !important;
}
}
.field-value {
color: #1F2329;
display: inline-block;
}
}
}
</style> </style>
{% endblock %} {% endblock %}