liuhairui 8 ماه پیش
والد
کامیت
dffc9104b5

+ 17 - 0
src/api/mes/job.js

@@ -1082,5 +1082,22 @@ export const viewQueueStatus = (params) => {
   })
 }
 
+//查询队列列表
+export const get_queue_logs = (data) => {
+  return service({
+    url: '/mes_server/work_order/get_queue_logs',
+    method: 'post',
+    data
+  })
+}
+//任务状态统计接口
+export const getTaskProgress = (params) => {
+  return service({
+    url: '/mes_server/work_order/getTaskProgress',
+    method: 'get',
+    params
+  })
+}
+
 
 

+ 27 - 64
src/view/performance/QualityAssessment/SemiFinishedRework.vue

@@ -2,106 +2,69 @@
   <div>
     <h2>3D 预览</h2>
     <div ref="threeCanvas" style="width: 400px; height: 400px;"></div>
-
-    <!-- el-image 用于展示图片 -->
-    <el-image
-      :src="formatImageUrl(newImageUrl)"
-      fit="contain"
-      style="width: 200px; height: 200px; display: block; margin-top: 10px;"
-      :preview-src-list="[formatImageUrl(newImageUrl)]"
-      :initial-index="0"
-      @load="handleImageLoad"
-      ref="imgRefEl"
-    />
   </div>
 </template>
 
 <script setup>
-import { ref, onMounted, nextTick } from 'vue'
+import { onMounted, ref } from 'vue'
 import * as THREE from 'three'
 import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
 
-const newImageUrl = '/img/zgm.jpg'
-const formatImageUrl = (path) => {
-  if (!path) return ''
-  const base = 'http://20.0.16.128:9093'
-  return `${base}/${path.replace(/^public\//, '')}`
-}
-
 const threeCanvas = ref(null)
-const imgRefEl = ref(null) 
 
-let scene, camera, renderer, controls, box = null
+let scene, camera, renderer, controls
 
-// 生命周期钩子
 onMounted(() => {
   initScene()
-  createBox()
+  createTexturedBox()
   animate()
 })
 
-// 初始化 Three.js 场景
 const initScene = () => {
   scene = new THREE.Scene()
-  scene.background = null
+  scene.background = null // 背景透明
 
-  // 创建一个适合查看立方体的相机
   camera = new THREE.PerspectiveCamera(75, 1, 0.1, 1000)
   camera.position.set(0, 0, 5)
 
-  // 创建渲染器
   renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true })
   renderer.setSize(400, 400)
   threeCanvas.value.appendChild(renderer.domElement)
 
-  // 控制器
   controls = new OrbitControls(camera, renderer.domElement)
   controls.enableDamping = true
 
-  // 光源配置
-  const ambientLight = new THREE.AmbientLight(0xffffff, 0.5) // 环境光,弱一点
+  // 添加环境
+  const ambientLight = new THREE.AmbientLight(0xffffff, 1.0)
   scene.add(ambientLight)
 
-  const directionalLight = new THREE.DirectionalLight(0xffffff, 1) // 方向光,亮一点
-  directionalLight.position.set(5, 5, 5) // 定义光源位置
+  // 添加方向光
+  const directionalLight = new THREE.DirectionalLight(0xffffff, 1.0)
+  directionalLight.position.set(5, 5, 5)
   scene.add(directionalLight)
-
-  const pointLight = new THREE.PointLight(0xffffff, 1, 100) // 点光源
-  pointLight.position.set(2, 2, 2)
-  scene.add(pointLight)
 }
 
-// 创建立方体
-const createBox = () => {
+const createTexturedBox = () => {
   const geometry = new THREE.BoxGeometry(2.2, 3.5, 0.8)
-  const materials = new Array(6).fill(new THREE.MeshStandardMaterial({ color: 0xcccccc }))
-  box = new THREE.Mesh(geometry, materials)
-  scene.add(box)
-}
-
-// 图片加载完成后作为纹理贴图
-const handleImageLoad = async () => {
-  await nextTick() // 确保 el-image 渲染完成
-
-  // 访问真实 <img> DOM(el-image 内部包裹的)
-  const img = imgRefEl.value?.$el?.querySelector('img')
-  if (!img) {
-    console.warn('未找到图片元素')
-    return
-  }
-
-  const texture = new THREE.Texture(img)
-  texture.needsUpdate = true
-
-  if (box) {
-    box.material.forEach((mat) => {
-      mat.map = texture
-      mat.needsUpdate = true
-    })
-  }
+  const textureLoader = new THREE.TextureLoader()
+
+  // 确保纹理加载完成后再使用
+  textureLoader.load(
+    '/src/assets/zh.jpg',
+    (texture) => {
+      const material = new THREE.MeshStandardMaterial({ map: texture })
+      const materials = new Array(6).fill(material)
+
+      const box = new THREE.Mesh(geometry, materials)
+      scene.add(box)
+    },
+    undefined,
+    (error) => {
+      console.error('纹理加载失败:', error)
+    }
+  )
 }
 
-// 动画循环
 const animate = () => {
   requestAnimationFrame(animate)
   controls.update()

+ 15 - 3
src/view/performance/QualityAssessment/Template.vue

@@ -6,12 +6,21 @@
       <el-descriptions-item label="图生文模版" :span="2">
         <textarea
           v-model="textareaContent"
-          placeholder="请输入提示词(可留空自动识别)"
-          rows="20"
+          placeholder="请输入提示词"
+          rows="10"
           class="custom-textarea"
           @keydown.tab.prevent="insertTab"
         ></textarea>
       </el-descriptions-item>
+	  <el-descriptions-item label="文生文模版" :span="2">
+	    <textarea
+	      v-model="english_content"
+	      placeholder="请输入提示词"
+	      rows="10"
+	      class="custom-textarea"
+	      @keydown.tab.prevent="insertTab"
+	    ></textarea>
+	  </el-descriptions-item>
 
       <!-- 出图尺寸输入区域 -->
       <el-descriptions-item label="出图尺寸" :span="2">
@@ -42,7 +51,6 @@
       <el-descriptions-item label="操作" :span="2">
         <el-button
           type="primary"
-          size="small"
           @click="updathandle"
           :loading="isLoading"
         >
@@ -60,6 +68,8 @@ import { ElMessage } from 'element-plus'
 import { Template, updatetemplate } from '@/api/mes/job'
 
 const textareaContent = ref('')
+const english_content = ref('')
+
 const height = ref('')
 const width = ref('')
 const isLoading = ref(false)
@@ -68,6 +78,7 @@ const isLoading = ref(false)
 const handleRowClick = async () => {
   const res = await Template()
   textareaContent.value = res.data.content || ''
+  english_content.value = res.data.english_content || ''
   height.value = res.data.height || ''
   width.value = res.data.width || ''
 }
@@ -78,6 +89,7 @@ const updathandle = async () => {
   isLoading.value = true
   const res = await updatetemplate({
     textareaContent: textareaContent.value,
+	english_content: english_content.value,
     height: height.value,
     width: width.value
   })

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 591 - 441
src/view/performance/QualityAssessment/excessive.vue


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است