tangning 2 månader sedan
förälder
incheckning
a161fc6f00
1 ändrade filer med 38 tillägg och 22 borttagningar
  1. 38 22
      src/views/productOperation/viewKankan.vue

+ 38 - 22
src/views/productOperation/viewKankan.vue

@@ -12,7 +12,7 @@
           <!-- <a-button type="primary" @click="handleMoveAll"> 批量迁移</a-button> -->
         </template>
         <template #href="{ record }">
-          <a v-if="record.name" target="_blank" :href="location.host=='v4-uat.4dkankan.com'?`https://test.4dkankan.com/panorama/show.html?id=${record.sceneCodes}&lang=zh`:`/panorama/show.html?id=${record.sceneCodes}&lang=zh`">{{ record.name }}</a>
+          <a v-if="record.name" target="_blank" :href="getUrl(record)">{{ record.name }}</a>
           <span v-else>-</span>
         </template>
         <template #action="{ record }">
@@ -42,7 +42,13 @@
       </BasicTable>
       <BasicTable v-else @register="registerTableScene" ref="tableRef">
         <template #toolbar>
-          <a-button type="primary" v-if="getTypeCheckPerm('projects-move-batch')" @click="handleMoveAll"> 批量迁移</a-button>
+          <a-button
+            type="primary"
+            v-if="getTypeCheckPerm('projects-move-batch')"
+            @click="handleMoveAll"
+          >
+            批量迁移</a-button
+          >
         </template>
         <template #status="{ record }">
           <span v-if="record.status != '-1'">{{ record.statusString }}</span>
@@ -60,12 +66,9 @@
           </Tooltip>
         </template>
         <template #href="{ record }">
-          <a
-            v-if="record.name"
-            target="_blank"
-            :href="record.webSite || record.thumb"
-            >{{ record.name }}</a
-          >
+          <a v-if="record.name" target="_blank" :href="record.webSite || record.thumb">{{
+            record.name
+          }}</a>
           <!-- <span v-else-if="record.name">{{ record.name }}</span> -->
           <span v-else>-</span>
         </template>
@@ -80,12 +83,16 @@
               },
               {
                 label: '切图优先级',
-                ifShow: getTypeCheckPerm('projects-priority') && record.calcStatus == 1 && record.panoStatus == 1,
+                ifShow:
+                  getTypeCheckPerm('projects-priority') &&
+                  record.calcStatus == 1 &&
+                  record.panoStatus == 1,
                 onClick: handleQtPriority.bind(null, record),
               },
               {
                 label: '迁移',
-                disabled: record.calcStatus != 1 || record.panoStatus == 2 || record.panoStatus == 1, //计算中计算失败不予迁移
+                disabled:
+                  record.calcStatus != 1 || record.panoStatus == 2 || record.panoStatus == 1, //计算中计算失败不予迁移
                 ifShow: getTypeCheckPerm('projects-move') && tableType != 3,
                 onClick: handleMove.bind(null, record),
               },
@@ -105,7 +112,11 @@
               },
               {
                 label: '重算',
-                disabled: record.calcStatus != -1 && (record.calcStatus == 0 || (record.panoStatus != 3 && record.panoStatus != -1) || (record.status == 1 && record.payStatus != 1)),
+                disabled:
+                  record.calcStatus != -1 &&
+                  (record.calcStatus == 0 ||
+                    (record.panoStatus != 3 && record.panoStatus != -1) ||
+                    (record.status == 1 && record.payStatus != 1)),
                 ifShow: getTypeCheckPerm('projects-recalculate') && tableType != 3,
                 popConfirm: {
                   title: '是否重算?',
@@ -117,7 +128,8 @@
                 //icon: 'ic:outline-delete-outline',
                 color: 'error',
                 ifShow: getTypeCheckPerm('projects-delete'),
-                disabled: record.calcStatus == 0 || record.panoStatus == 2 || record.panoStatus == 1,
+                disabled:
+                  record.calcStatus == 0 || record.panoStatus == 2 || record.panoStatus == 1,
                 //onClick: handleDelete.bind(null, record),
                 popConfirm: {
                   title: '是否删除?',
@@ -417,16 +429,19 @@
           reload();
         });
       }
-      // function exportExcel() {
-      //   createConfirm({
-      //     iconType: 'warning',
-      //     title: () => h('span', '温馨提示'),
-      //     content: () => h('span', '确定当前标签下的订单记录?'),
-      //     onOk: async () => {
-      //       // await DownExport();
-      //     },
-      //   });
-      // }
+      /**
+       * 导出Excel文件
+       *
+       * 弹出确认框,提示用户是否确定导出当前标签下的订单记录。
+       *
+       * @returns 无返回值
+       */
+      function getUrl(record) {
+        let url = `/panorama/show.html?id=${record.sceneCodes}&lang=zh`;
+        return window.location.host == 'v4-uat.4dkankan.com'
+          ? `https://test.4dkankan.com` + url
+          : url;
+      }
       return {
         registerTable,
         registerTableScene,
@@ -438,6 +453,7 @@
         getTypeCheckPerm,
         tableType,
         loading,
+        getUrl,
         reload,
         handleMoveAll,
         handlePriority,