Procházet zdrojové kódy

功能优化调整

lipenghui před 2 měsíci
rodič
revize
fec5747a3c

+ 3 - 1
package.json

@@ -34,6 +34,7 @@
     "@fullcalendar/vue3": "^6.1.17",
     "@iconify/iconify": "^3.1.1",
     "@microsoft/fetch-event-source": "^2.0.1",
+    "@types/echarts": "^5.0.0",
     "@videojs-player/vue": "^1.0.0",
     "@vueuse/core": "^10.9.0",
     "@wangeditor/editor": "^5.1.23",
@@ -50,7 +51,7 @@
     "dayjs": "^1.11.10",
     "diagram-js": "^12.8.0",
     "driver.js": "^1.3.1",
-    "echarts": "^5.5.0",
+    "echarts": "^5.6.0",
     "echarts-wordcloud": "^2.1.0",
     "element-plus": "2.9.1",
     "fast-xml-parser": "^4.3.2",
@@ -78,6 +79,7 @@
     "video.js": "^7.21.5",
     "vue": "3.5.12",
     "vue-dompurify-html": "^4.1.4",
+    "vue-echarts": "^7.0.3",
     "vue-i18n": "9.10.2",
     "vue-router": "4.4.5",
     "vue-types": "^5.1.1",

+ 5 - 1
src/components/language/LangInput.vue

@@ -63,7 +63,11 @@ const displayValue = computed({
     return props.modelValue.split('~~')[0] || ''
   },
   set(val) {
-    emit('update:modelValue', val + '~~' + englishValue.value)
+    if (englishValue.value !== null&&englishValue.value !== undefined&&englishValue.value !== '') {
+      emit('update:modelValue', val + '~~' + englishValue.value)
+    }else {
+      emit('update:modelValue', val)
+    }
   }
 })
 

+ 2 - 1
src/views/pms/iotmainworkorder/SelectedMaterialDrawer.vue

@@ -22,7 +22,7 @@
           <el-table-column prop="unitPrice" label="单价" width="180" />
           <el-table-column prop="quantity" label="消耗数量" width="180" />
           <el-table-column prop="materialSource" label="库存类型" width="180" />
-          <el-table-column label="操作" align="right">
+          <el-table-column label="操作" align="right" v-if="!props.detail">
             <template #default="scope">
               <el-button
                 size="small"
@@ -80,6 +80,7 @@ const total = ref(0) // 列表的总页数
 const props = defineProps({
   modelValue: Boolean,
   nodeId: Number,
+  detail: Boolean,
   materials: Array // 接收父组件传递的完整物料列表
 })
 

+ 4 - 2
src/views/pms/maintain/IotMaintain.vue

@@ -509,9 +509,11 @@ const selectChoose = (selectedMaterial) => {
   console.log('添加到本地列表的数据:', materialList.value)
 }
 const maintainChoose = (formData) => {
-  console.log('接收到的数据eee:', JSON.stringify(formData))
   formData.forEach((item) => {
-    list.value.push(item)
+    const index = list.value.findIndex((li) => item.name === li.name)
+    if (index==-1){
+      list.value.push(item)
+    }
   })
 }
 

+ 1 - 1
src/views/pms/maintain/IotMaintainDetail.vue

@@ -220,6 +220,7 @@
     @update:model-value="(val) => (drawerVisible = val)"
     :node-id="currentBomNodeId"
     :materials="materialList"
+    :detail="true"
   />
 </template>
 <script setup lang="ts">
@@ -322,7 +323,6 @@ const endRule = [
 ]
 const handleViewNew = (nodeId, bomId) => {
   drawerVisible.value = true
-  // showDrawer.value.openDrawer()
   const queryParams = {
     pageNo: 1,
     pageSize: 100,