ZaiZai 7 mesi fa
parent
commit
074e91d864

+ 2 - 2
package.json

@@ -18,9 +18,9 @@
         "dayjs": "^1.11.12",
         "echarts": "^5.5.1",
         "element-plus": "^2.7.8",
-        "hc-vue3-ui": "^4.1.2",
+        "hc-vue3-ui": "^4.1.4",
         "js-base64": "^3.7.7",
-        "js-fast-way": "^0.5.0",
+        "js-fast-way": "^0.5.5",
         "js-md5": "^0.8.3",
         "js-web-screen-shot": "^1.9.9-rc.20",
         "nprogress": "^0.2.0",

+ 2 - 0
src/App.vue

@@ -9,6 +9,7 @@ import { nextTick, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { detectionBrowser, getAppVersion, useOsTheme } from 'hc-vue3-ui'
 import { getObjValue, setElementMainColor } from 'js-fast-way'
+import website from '~src/config'
 
 //初始变量
 const appStore = useAppStore()
@@ -25,6 +26,7 @@ watch(() => [
 })
 
 nextTick(() => {
+    window.$localModel = website.localModel
     setUserTheme(appStore.getThemeVal, appStore.getColor)
     //生产环境下,检测更新
     if (import.meta.env.PROD && appStore.isSource !== 'app') {

+ 1 - 0
src/config/index.js

@@ -25,6 +25,7 @@ export default {
     //线上还没有,先关掉,防止控制他一直连接失败
     socketLimit: 10, //连接失败后,最大重连次数
     socketInterval: 10000, //连接失败后,每次重连的间隔时间,单位毫秒。
+    localModel: true, //本地模式,开启后,将关闭https强转、截图等相关功能
     ...config,
     //这里不再支持配置请求地址,请在 src/config/index.json 文件中配置。
     //相关参数,可查阅 src/config/index.md 文件说明

+ 4 - 1
src/global/components/hc-pdfs/pdfs.vue

@@ -1,11 +1,12 @@
 <template>
-    <hc-pdf v-if="isPdfDom" :src="pdfUrl" :download="isDownload" :print="isPrint" />
+    <hc-pdf v-if="isPdfDom" :src="pdfUrl" :download="isDownload" :print="isPrint" :is-https="isHttps" />
 </template>
 
 <script setup>
 import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
 import { btnAuth, decode } from '~uti/btn-auth'
 import { isNullES } from 'js-fast-way'
+import website from '~src/config'
 
 const props = defineProps({
     url: {
@@ -35,7 +36,9 @@ watch(() => [props.url, props.code], ([url, code]) => {
 const isPdfDom = ref(false)
 const isDownload = ref(false)
 const isPrint = ref(false)
+const isHttps = ref(false)
 onMounted(() => {
+    isHttps.value = !website.localModel
     isDownload.value = btnAuth('client-pdf-download')
     isPrint.value = btnAuth('client-pdf-print')
     setPdfSrcData()

+ 7 - 0
src/layout/modules/HelpInfoBar.vue

@@ -42,6 +42,7 @@ import { useAppStore } from '~src/store'
 import ScreenShot from 'js-web-screen-shot'
 import { getStoreValue } from '~src/utils/storage'
 import { getObjValue, getToObjVal } from 'js-fast-way'
+import website from '~src/config'
 
 //初始变量
 const router = useRouter()
@@ -71,7 +72,9 @@ watch(() => [
 })
 
 //渲染完成
+const localModel = ref(false)
 nextTick(() => {
+    localModel.value = website.localModel
     getVideoUrl(useRoutes?.name)
     getExcelUrl(useRoutes?.name)
     const webRtc = useAppState.getShotWebRtc
@@ -103,6 +106,10 @@ const bubbleUpdate = (val) => {
 
 //工单服务\需求反馈
 const screenShortClick = () => {
+    if (localModel.value) {
+        window?.$message.warning('当前为本地模式,不支持截图')
+        return
+    }
     nextTick(() => {
         new ScreenShot({
             enableWebRtc: webRtcVal.value, //截图方式

+ 12 - 4
src/views/other-file/image-view.vue

@@ -6,7 +6,7 @@
                     <div class="hc-project-icon-box">
                         <HcIcon name="stack" />
                     </div>
-                    <div class="ml-2 project-name-box">
+                    <div class="project-name-box ml-2">
                         <span class="project-alias">{{ projectInfo.projectName }}</span>
                     </div>
                 </div>
@@ -74,7 +74,7 @@
                     <template #info="{ row }">
                         <div class="hc-table-col-item">
                             <div v-if="row.type !== 1" class="img-box">
-                                <HcImg :src="setImageUrl(row.imageUrl)" class="hc-image" />
+                                <HcImg :src="setImageUrl(row.imageUrl)" class="hc-image" :is-https="isHttps" />
                             </div>
                             <div v-else class="img-box">
                                 <video :src="row.imageUrl">
@@ -138,9 +138,11 @@ import WbsTree from './components/WbsTree.vue'
 import HcTreeData from './components/HcTreeData.vue'
 import imageApi from '~api/other-file/imageData'
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
-import { arrToId, downloadBlob, getArrValue, isString } from 'js-fast-way'
+import { arrToId, downloadBlob, getArrValue } from 'js-fast-way'
 import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
+import website from '~src/config'
+
 //变量
 const router = useRouter()
 const useRoutes = useRoute()
@@ -196,9 +198,15 @@ const TreeCurrentNodeKey = ref(getStoreValue('TreeCurrentNodeKey') || '')
 // onMounted(() => {
 //     initMounted()
 // })
+const isHttps = ref(false)
+onMounted(() => {
+    isHttps.value = !website.localModel
+})
+
 onActivated(()=>{
     initMounted()
 })
+
 const initMounted = () => {
     console.log('onMounted')
     const nodeKey = TreeCurrentNodeKey.value
@@ -458,7 +466,7 @@ const delClick = () => {
         HcDelMsg( async ( resolve) => {
             await removeImageclassifyFile(ids)
             resolve() //关闭弹窗的回调
-         
+
         })
     } else {
         window.$message?.warning('请先勾选需要删除的资料文件')

+ 6 - 3
src/views/other/order-service.vue

@@ -15,7 +15,7 @@
                             <div class="desc_para" v-html="item.opinionContent" />
                             <div v-if="item.returnFiles?.length > 0" class="image_desc">
                                 <div v-for="(items, indexs) in item.returnFiles" :key="indexs" class="hc-image-box">
-                                    <HcImg :index="indexs" :src="items" :srcs="item.returnFiles" class="hc-image" />
+                                    <HcImg :index="indexs" :src="items" :srcs="item.returnFiles" class="hc-image" :is-https="isHttps" />
                                 </div>
                             </div>
                             <div class="foot-tools-box">
@@ -64,7 +64,7 @@
             <HcNewCard :scrollbar="false">
                 <template #header>
                     <el-badge :value="2" class="item-badge">
-                        <div class="font-bold text-lg">我的工单服务进度</div>
+                        <div class="text-lg font-bold">我的工单服务进度</div>
                     </el-badge>
                 </template>
                 <template #extra>
@@ -134,7 +134,7 @@
             <div class="mt-5">
                 <el-input v-model="opinionContent" :rows="3" placeholder="请输入你宝贵的建议,我们将会跟踪解决" type="textarea" />
             </div>
-            <div v-loading="spinShow" class="mt-3 upload-img">
+            <div v-loading="spinShow" class="upload-img mt-3">
                 <div class="w-full">
                     <HcUploads
                         :accept="uploadAccept" :file-list="uploadFileList" :limit="3" :size="30" :viewer="false" action="put-file"
@@ -179,6 +179,7 @@ import avatarPng from '~src/assets/images/avatar.png'
 import Web515Png from '~src/assets/images/Web515.png'
 import { userConfigSave } from '~api/other'
 import { base64ToFile, getArrValue, getObjVal, getObjValue } from 'js-fast-way'
+import website from '~src/config'
 import ossApi from '~api/oss'
 
 //初始变量
@@ -216,7 +217,9 @@ nextTick(() => {
     }
 })
 
+const isHttps = ref(false)
 onMounted(() => {
+    isHttps.value = !website.localModel
     //获取相关数据
     queryUserOpinionPage()
     queryCurrentUserOpinionList()

+ 9 - 9
yarn.lock

@@ -1962,15 +1962,15 @@ has-flag@^4.0.0:
   resolved "http://39.108.216.210:9000/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
   integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
 
-hc-vue3-ui@^4.1.2:
-  version "4.1.2"
-  resolved "http://39.108.216.210:9000/hc-vue3-ui/-/hc-vue3-ui-4.1.2.tgz#3a7aa7c2d4cea02c892f4482d749c922e0b43c9b"
-  integrity sha512-FgCTg0CQ9Xh4QW74U6Ymc+SkHmtv7BQ6z1ZIc0AvaDE3m46Sw1Nx1h7/j9+1bas5fXIbhTd40UgSzwrbHJKCZw==
+hc-vue3-ui@^4.1.4:
+  version "4.1.4"
+  resolved "http://39.108.216.210:9000/hc-vue3-ui/-/hc-vue3-ui-4.1.4.tgz#9305484c45acca0f08d1d461154c55c8ef424700"
+  integrity sha512-v5ydMTNdsPObdWd7FtsYaOGyRT+iRjpdBXv+W9TC1t+O/1TUu+whu58AUF7gVsaaDh6NdDaRaRpgq7Aqd5GNsQ==
   dependencies:
     axios "^1.7.2"
     dayjs "^1.11.12"
     js-base64 "^3.7.7"
-    js-fast-way "^0.5.0"
+    js-fast-way "^0.5.5"
     js-md5 "^0.8.3"
     sortablejs "^1.15.1"
     split.js "^1.6.5"
@@ -2098,10 +2098,10 @@ js-base64@^3.7.7:
   resolved "http://39.108.216.210:9000/js-base64/-/js-base64-3.7.7.tgz#e51b84bf78fbf5702b9541e2cb7bfcb893b43e79"
   integrity sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==
 
-js-fast-way@^0.5.0:
-  version "0.5.0"
-  resolved "http://39.108.216.210:9000/js-fast-way/-/js-fast-way-0.5.0.tgz#d1a5d10de0ec930fb793b90d1f6f1cbaec49a29e"
-  integrity sha512-rM2ojF41C+UBDbt0ABlgHkOcZXrGbj94MniryL+xq4oW9xIUV3V/09PoFm/u6aZEdpWjf+bILfQRavyV7pDZCQ==
+js-fast-way@^0.5.5:
+  version "0.5.5"
+  resolved "http://39.108.216.210:9000/js-fast-way/-/js-fast-way-0.5.5.tgz#5b7458a6d8bedfc463f876ed52be2d7f358153f1"
+  integrity sha512-sE+GUqHbtUpT3RASgNRdb2rdr+2IcEcFYtyqEh3lfj1757EpUn+JevrPzWxjRj5E2dWr7+CkkGgIppFQhpj/jw==
 
 js-md5@^0.8.3:
   version "0.8.3"