demands前端修改,添加回复,但并未添加逻辑
This commit is contained in:
parent
618bf4285a
commit
a949996907
@ -15,6 +15,7 @@
|
|||||||
<th>请求内容</th>
|
<th>请求内容</th>
|
||||||
<th>悬赏金额</th>
|
<th>悬赏金额</th>
|
||||||
<th>需求创建时间</th>
|
<th>需求创建时间</th>
|
||||||
|
<th>回复</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -34,10 +35,51 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="date">{{ formatDate(demand.date) }}</td>
|
<td class="date">{{ formatDate(demand.date) }}</td>
|
||||||
|
<td>
|
||||||
|
<button class="btn-common btn-gradient btn-reply" @click.stop="showReply(demand)">回复</button>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 回复查看表单,联系方式,昵称,相关建议-->
|
||||||
|
<div v-if="replyModal" class="modal-overlay" @click="closeReplyModal">
|
||||||
|
<div class="modal-content" @click.stop>
|
||||||
|
<div class="modal-header">
|
||||||
|
<h2>回复</h2>
|
||||||
|
<button class="close-btn" @click="closeReplyModal">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form class="add-modal-form">
|
||||||
|
<div class="form-row">
|
||||||
|
<span class="label">请求者:</span>
|
||||||
|
<input class="input" placeholder="可选" />
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<span class="label">QQ号:</span>
|
||||||
|
<input v-model="addForm.qq_code" class="input" placeholder="可选" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<span class="label">相关建议:</span>
|
||||||
|
<textarea
|
||||||
|
v-model="addForm.sendcontent"
|
||||||
|
class="input"
|
||||||
|
placeholder="请输入需求内容"
|
||||||
|
rows="3"
|
||||||
|
ref="autoTextarea"
|
||||||
|
@input="autoResize"
|
||||||
|
></textarea>
|
||||||
|
</div>
|
||||||
|
<div v-if="addError" class="error">{{ addError }}</div>
|
||||||
|
<button class="btn-common btn-gradient submit-btn" :disabled="addLoading">
|
||||||
|
{{ addLoading ? '提交中...' : '提交' }}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- 详情弹窗 -->
|
<!-- 详情弹窗 -->
|
||||||
<div v-if="showModal" class="modal-overlay" @click="closeModal">
|
<div v-if="showModal" class="modal-overlay" @click="closeModal">
|
||||||
@ -127,6 +169,8 @@ const demands = ref([])
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const error = ref(null)
|
const error = ref(null)
|
||||||
const showModal = ref(false)
|
const showModal = ref(false)
|
||||||
|
const reply = ref(null)
|
||||||
|
const replyModal = ref(false)
|
||||||
const selectedDemand = ref(null)
|
const selectedDemand = ref(null)
|
||||||
const showAddModal = ref(false)
|
const showAddModal = ref(false)
|
||||||
const addError = ref('')
|
const addError = ref('')
|
||||||
@ -185,6 +229,16 @@ const fetchDemands = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//回复显示弹窗
|
||||||
|
const showReply = (demand) => {
|
||||||
|
reply.value = demand
|
||||||
|
replyModal.value = true
|
||||||
|
}
|
||||||
|
//关闭回复弹窗
|
||||||
|
const closeReplyModal = () => {
|
||||||
|
replyModal.value = false
|
||||||
|
}
|
||||||
|
|
||||||
// 显示详情弹窗
|
// 显示详情弹窗
|
||||||
const showDetail = (demand) => {
|
const showDetail = (demand) => {
|
||||||
selectedDemand.value = demand
|
selectedDemand.value = demand
|
||||||
@ -308,6 +362,12 @@ function autoResize() {
|
|||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-reply {
|
||||||
|
padding: 5px 15px;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user