Browse Source

Merge branch 'master' of http://112.74.164.79:3000/chenying/X-web

landydb 2 weeks ago
parent
commit
38a0b4f7de

+ 1 - 1
gulpfile.js

@@ -47,8 +47,8 @@ gulp.task('replace:version', ['create:versionCatalog'], function () {
 gulp.task('replace:systemName', ['replace:version'], function () {
   // 可根据需要自定义 systemName
   const systemName = process.env.npm_config_systemname || '木之云数字化平台';
-  // const systemName = process.env.npm_config_systemname || '昌柘伟业数字化平台';
   // const systemName = process.env.npm_config_systemname || '东齐航空装备数字化平台';
+  // const systemName = process.env.npm_config_systemname || '昌柘伟业数字化平台';
   return gulp.src(`${versionPath}/static/config/index-${env}.js`)
     .pipe($.replace(/window\.SITE_CONFIG\['systemName'\] = '.*'/g, `window.SITE_CONFIG['systemName'] = '${systemName}'`))
     .pipe(gulp.dest(`${versionPath}/static/config/`));

+ 12 - 5
src/views/modules/production/plan-submit.vue

@@ -48,10 +48,13 @@
         <el-table-column header-align="center" align="center" min-width="100" :show-tooltip-when-overflow="true"
           label="简图">
           <template slot-scope="scope">
-            <div class="thumb-list" v-if="getImageList(scope.row.attachList2).length">
-              <img v-for="(img, idx) in getImageList(scope.row.attachList2)" :key="(img.url || '') + idx" class="thumb"
-                :src="downloadUrl + img.url" :alt="img.fileName" @click="previewFile(img.fileName, img.url)" />
-            </div>
+            <el-button v-if="scope.row.attachList2 && scope.row.attachList2.length" type="text" size="small"
+              @click="openImagePreview(scope.row.attachList2)">
+              查看({{ scope.row.attachList2.length }})
+            </el-button>
+            <el-button v-else type="text" size="small" disabled>
+              查看(0)
+            </el-button>
           </template>
         </el-table-column>
         <el-table-column prop="materials" header-align="center" align="center" min-width="140"
@@ -135,6 +138,7 @@
     <!-- 图片预览组件(使用 v-viewer 打开大图) -->
     <preview-component v-if="previewVisible" ref="preview" />
     <project-draw-preview ref="drawPreview" />
+    <image-preview ref="imagePreview" />
   </div>
 </template>
 
@@ -143,9 +147,12 @@ import AttachDetailDialog from '../common/attach-detail-dialog'
 import PreviewComponent from '../common/preview-component'
 import ProjectDrawPreview from '../tech/product-draw-detail-dialog.vue'
 import { downloadUrl } from '@/api/file'
+import ImagePreview from '@/views/modules/common/image-preview.vue'
+import ImageViewerMixin from '@/views/modules/common/mixins/image-viewer-mixin'
 export default {
   name: 'plan-submit',
-  components: { AttachDetailDialog, PreviewComponent, ProjectDrawPreview },
+  mixins: [ImageViewerMixin],
+  components: { AttachDetailDialog, PreviewComponent, ProjectDrawPreview, ImagePreview },
   computed: {},
   data() {
     return {

+ 7 - 14
src/views/modules/tech/draw-management.vue

@@ -42,20 +42,13 @@
         </el-table-column>
         <el-table-column header-align="center" align="center" min-width="50" label="图纸文件">
           <template slot-scope="scope">
-            <div v-if="scope.row.attachList && scope.row.attachList.length">
-              <template v-if="isImage(scope.row.attachList[0])">
-                <img :src="getThumbUrl(scope.row.attachList[0])" :alt="scope.row.attachList[0].fileName"
-                  style="width:48px;height:48px;object-fit:cover;border-radius:4px;cursor:pointer;border:1px solid #e5e6eb;"
-                  @click="openImagePreview(scope.row.attachList)" />
-              </template>
-              <template v-else>
-                <div title="非图片文件,点击查看图片预览" @click.stop="openImagePreview(scope.row.attachList)"
-                  style="width:48px;height:48px;border-radius:4px;border:1px solid #e5e6eb;display:flex;align-items:center;justify-content:center;background:#f5f7fa;color:#909399;cursor:pointer;">
-                  <i class="el-icon-picture-outline" style="font-size:20px;"></i>
-                </div>
-              </template>
-            </div>
-            <span v-else style="color:#c0c4cc;">无</span>
+            <el-button v-if="scope.row.attachList && scope.row.attachList.length" type="text" size="small"
+              @click="openImagePreview(scope.row.attachList)">
+              查看({{ scope.row.attachList.length }})
+            </el-button>
+            <el-button v-else type="text" size="small" disabled>
+              查看(0)
+            </el-button>
           </template>
         </el-table-column>
         <!-- <el-table-column

+ 13 - 7
src/views/modules/tech/project-product-detail.vue

@@ -61,10 +61,13 @@
         <el-table-column prop="attachList2" header-align="center" align="center" min-width="100"
           :show-tooltip-when-overflow="true" label="简图">
           <template slot-scope="scope">
-            <div class="thumb-list" v-if="getImageList(scope.row.attachList2).length">
-              <img v-for="(img, idx) in getImageList(scope.row.attachList2)" :key="(img.url || '') + idx" class="thumb"
-                :src="downloadUrl + img.url" :alt="img.fileName" @click="previewFile(img.fileName, img.url)" />
-            </div>
+            <el-button v-if="scope.row.attachList2 && scope.row.attachList2.length" type="text" size="small"
+              @click="openImagePreview(scope.row.attachList2)">
+              查看({{ scope.row.attachList2.length }})
+            </el-button>
+            <el-button v-else type="text" size="small" disabled>
+              查看(0)
+            </el-button>
           </template>
         </el-table-column>
         <el-table-column prop="productSpec" header-align="center" align="center" min-width="140"
@@ -115,6 +118,7 @@
     <attach-detail-dialog ref="attachDetail" />
     <preview-component v-if="previewVisible" ref="preview" />
     <project-draw-preview ref="drawPreview" />
+    <image-preview ref="imagePreview" />
   </div>
 </template>
 
@@ -124,9 +128,12 @@ import AttachDetailDialog from '../common/attach-detail-dialog'
 import PreviewComponent from '../common/preview-component'
 import ProjectDrawPreview from './product-draw-detail-dialog.vue'
 import { downloadUrl } from '@/api/file'
+import ImagePreview from '@/views/modules/common/image-preview.vue'
+import ImageViewerMixin from '@/views/modules/common/mixins/image-viewer-mixin'
 export default {
+  mixins: [ImageViewerMixin],
   name: 'project-product-detail',
-  components: { UserComponent, AttachDetailDialog, PreviewComponent, ProjectDrawPreview },
+  components: { UserComponent, AttachDetailDialog, PreviewComponent, ProjectDrawPreview, ImagePreview },
   computed: {},
   data() {
     return {
@@ -139,8 +146,7 @@ export default {
       dataList: [],
       dataListLoading: false,
       previewVisible: false,
-      downloadUrl: downloadUrl
-
+      downloadUrl: downloadUrl,
     }
   },
   created() { },

+ 19 - 4
src/views/modules/tech/project-tech-submit.vue

@@ -42,11 +42,20 @@
         <el-table-column prop="attachList2" header-align="center" align="center" min-width="100"
           :show-tooltip-when-overflow="true" label="简图">
           <template slot-scope="scope">
+            <el-button v-if="scope.row.attachList2 && scope.row.attachList2.length" type="text" size="small"
+              @click="openImagePreview(scope.row.attachList2)">
+              查看({{ scope.row.attachList2.length }})
+            </el-button>
+            <el-button v-else type="text" size="small" disabled>
+              查看(0)
+            </el-button>
+          </template>
+          <!-- <template slot-scope="scope">
             <div class="thumb-list" v-if="getImageList(scope.row.attachList2).length">
               <img v-for="(img, idx) in getImageList(scope.row.attachList2)" :key="(img.url || '') + idx" class="thumb"
                 :src="downloadUrl + img.url" :alt="img.fileName" @click="previewFile(img.fileName, img.url)" />
             </div>
-          </template>
+          </template> -->
         </el-table-column>
         <el-table-column prop="materials" header-align="center" align="center" min-width="140"
           :show-tooltip-when-overflow="true" label="材料">
@@ -72,6 +81,9 @@
         <el-table-column prop="projectName" header-align="center" align="center" min-width="140"
           :show-tooltip-when-overflow="true" label="关重性">
         </el-table-column>
+        <el-table-column fixed="right" prop="cntAll" header-align="center" align="center" min-width="80"
+          :show-tooltip-when-overflow="true" label="计划数量">
+        </el-table-column>
         <el-table-column fixed="right" prop="isTechnology" header-align="center" align="center" min-width="140"
           :show-tooltip-when-overflow="true" label="是否编制工艺">
           <template slot-scope="scope">
@@ -103,7 +115,7 @@
 
     <attach-detail-dialog ref="attachDetail" />
     <preview-component v-if="previewVisible" ref="preview" />
-
+    <image-preview ref="imagePreview" />
   </div>
 </template>
 
@@ -111,9 +123,12 @@
 import AttachDetailDialog from '../common/attach-detail-dialog'
 import PreviewComponent from '../common/preview-component'
 import { downloadUrl } from '@/api/file'
+import ImagePreview from '@/views/modules/common/image-preview.vue'
+import ImageViewerMixin from '@/views/modules/common/mixins/image-viewer-mixin'
 export default {
   name: 'plan-submit',
-  components: { AttachDetailDialog, PreviewComponent },
+  mixins: [ImageViewerMixin],
+  components: { AttachDetailDialog, PreviewComponent, ImagePreview },
   computed: {},
   data() {
     return {
@@ -132,7 +147,7 @@ export default {
       craftsAddOrDetailVisible: false,
       previewVisible: false,
       downloadUrl: downloadUrl,
-      orderId:''
+      orderId: ''
     }
   },
   created() { },