Преглед на файлове

feat: 工作台请求卡片可点击跳转至咨询监看

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
liaoxg преди 3 месеца
родител
ревизия
a7f740f7d6
променени са 1 файла, в които са добавени 19 реда и са изтрити 4 реда
  1. 19 4
      client/pages/plan/workbench.vue

+ 19 - 4
client/pages/plan/workbench.vue

@@ -64,8 +64,10 @@
             <text class="request-type-tag">{{ requestTypeLabel(req.requestType) }}</text>
           </view>
 
-          <!-- Description (truncated 2 lines) -->
-          <text class="card-desc">{{ req.description }}</text>
+          <!-- Description (truncated 2 lines, clickable to open monitor) -->
+          <view @click.stop="goMonitor(req)">
+            <text class="card-desc">{{ req.description }}</text>
+          </view>
 
           <!-- Card bottom: budget + date + status -->
           <view class="card-meta">
@@ -79,7 +81,7 @@
           </view>
 
           <!-- Action buttons by status -->
-          <view v-if="req.status === 'pending'" class="action-row">
+          <view v-if="req.status === 'pending'" class="action-row" @click.stop>
             <button class="btn btn-accept" :disabled="acceptingId === req.id" @click="handleAccept(req)">
               {{ acceptingId === req.id ? '处理中...' : '接受' }}
             </button>
@@ -88,7 +90,10 @@
             </button>
           </view>
           <view v-else-if="req.status === 'accepted'" class="action-row">
-            <button class="btn btn-negotiate" disabled>去协商</button>
+            <button class="btn btn-negotiate" @click="goMonitor(req)">去协商</button>
+          </view>
+          <view v-else class="action-row" @click.stop>
+            <button class="btn btn-view" @click="goMonitor(req)">查看详情</button>
           </view>
         </view>
       </template>
@@ -223,6 +228,11 @@ function goBack() {
   uni.navigateBack()
 }
 
+function goMonitor(req) {
+  if (!req || !req.id) return
+  uni.navigateTo({ url: `/pages/plan/monitor?requestId=${req.id}` })
+}
+
 function formatDate(dateStr) {
   if (!dateStr) return ''
   const d = new Date(dateStr)
@@ -499,4 +509,9 @@ function formatDate(dateStr) {
 .btn-negotiate[disabled] {
   opacity: 0.4;
 }
+.btn-view {
+  background: rgba(255, 255, 255, 0.06);
+  border: 1px solid rgba(255, 255, 255, 0.15);
+  color: rgba(255, 255, 255, 0.7);
+}
 </style>