From df97bab9fcb3e6044ad736cd7483498f61f0feb4 Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期三, 04 十一月 2026 10:50:32 +0800
Subject: [PATCH] 增加回款日期修改

---
 src/main.js |   73 +++++++++++++++++++++++++++++++++++-
 1 files changed, 70 insertions(+), 3 deletions(-)

diff --git a/src/main.js b/src/main.js
index d800d22..14f631d 100644
--- a/src/main.js
+++ b/src/main.js
@@ -3,18 +3,24 @@
  * @Date: 2022-04-25 08:04:47
  * @LastEditors: your Name
  * @LastEditTime: 2022-04-25 16:33:00
- * @Description: 
+ * @Description:
  */
 import Vue from 'vue'
 import yearPicker from 'vue-year-picker'
 import Cookies from 'js-cookie'
 
 import Element from 'element-ui'
+import '@/assets/styles/tokens.css' // 璁捐浠ょ墝锛圕SS 鍙橀噺锛屼緵杩愯鏃舵崲鑲わ級
 import './assets/styles/element-variables.scss'
 
 import '@/assets/styles/index.scss' // global css
 import '@/assets/styles/ruoyi.scss' // ruoyi css
+// 杩愯鏃朵富棰樺眰 + 缁勪欢榛樿澶栬锛氬繀椤绘櫄浜� element-ui 涓� ruoyi.scss锛屽惁鍒欒鐩栦笉鐢熸晥
+import '@/assets/styles/theme-runtime.scss'
+import '@/assets/styles/element-override.scss'
+import '@/assets/styles/pdf-resize-dialog.scss'
 import App from './App'
+import FilePreview from '@/components/FilePreview/index.vue'
 import store from './store'
 import router from './router'
 import directive from './directive' //directive
@@ -27,6 +33,8 @@
 import { getConfigKey } from "@/api/system/config";
 import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
 import dataV from '@jiaminghi/data-view';//dataV
+// 涓婚鑹茶繍琛屾椂锛圕SS 鍙橀噺娉ㄥ叆锛�
+import { applyTheme, getStoredTheme, DEFAULT_PRIMARY } from '@/utils/theme'
 // 鍒嗛〉缁勪欢
 import Pagination from "@/components/Pagination";
 // 鑷畾涔夎〃鏍煎伐鍏风粍浠�
@@ -37,6 +45,7 @@
 import FileUpload from "@/components/FileUpload"
 // 鍥剧墖涓婁紶缁勪欢
 import ImageUpload from "@/components/ImageUpload"
+import AttachmentPreviewPane from "@/components/AttachmentPreviewPane/index.vue"
 // 瀛楀吀鏍囩缁勪欢
 import DictTag from '@/components/DictTag'
 // 澶撮儴鏍囩缁勪欢
@@ -47,6 +56,17 @@
 // import li_area_select from '@components/Address'
 import moment from "moment"
 import '@/utils/drag.js';
+import DingTalkPC from 'dingtalk-jsapi';
+
+Vue.prototype.$dingtalk = DingTalkPC;
+DingTalkPC.config({
+  agentId: 'your_agentId',
+  corpId: 'your_corpId',
+  timeStamp: new Date().getTime(),
+  nonceStr: 'your_nonceStr',
+  signature: 'your_signature',
+  jsApiList: ['runtime.permission.requestAuthCode']
+});
 
 Vue.prototype.$moment = moment;
 
@@ -64,6 +84,7 @@
 import echarts from 'echarts'
 Vue.prototype.$echarts = echarts
 
+
 // 鍏ㄥ眬缁勪欢鎸傝浇
 // Vue.component('li_area_select',li_area_select)
 Vue.component('DictTag', DictTag)
@@ -72,6 +93,30 @@
 Vue.component('Editor', Editor)
 Vue.component('FileUpload', FileUpload)
 Vue.component('ImageUpload', ImageUpload)
+Vue.component('AttachmentPreviewPane', AttachmentPreviewPane)
+
+// 闄勪欢鍐呭祵棰勮锛氭墍鏈夋姤閿�椤靛叡鐢�
+Vue.mixin({
+  data() {
+    return {
+      embeddedFile: null,
+      pdfFullscreen: false
+    }
+  },
+  methods: {
+    openEmbeddedPreview(item) {
+      if (!item) return
+      const ext = String(item.name || '').toLowerCase().split('.').pop()
+      const type = ext === 'pdf'
+        ? 'pdf'
+        : ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp'].includes(ext)
+          ? 'image'
+          : 'other'
+      this.embeddedFile = { name: item.name, url: item.url, type }
+      this.pdfVisible = true
+    }
+  }
+})
 
 Vue.use(directive)
 Vue.use(plugins)
@@ -90,14 +135,36 @@
  */
 
 Vue.use(Element, {
-  size: Cookies.get('size') || 'medium' // set element-ui default size
+  size: Cookies.get('size') || 'small' // set element-ui default size锛堝師 medium锛屾敼涓� small 鎻愬崌淇℃伅瀵嗗害锛�
 })
+
+// 鍚姩鍗冲簲鐢ㄥ凡淇濆瓨鐨勪富棰樿壊锛堢櫥褰曢〉绛変笉浣跨敤 Layout 鐨勯〉闈篃鑳界敓鏁堬級
+applyTheme(getStoredTheme() || DEFAULT_PRIMARY)
 
 Vue.config.productionTip = false
 
-new Vue({
+// 鍓嶇鏋勫缓鏍囪瘑锛氱敤浜庣‘璁ゆ祻瑙堝櫒瀹為檯鍔犺浇鐨勬槸鍝竴鐗堜唬鐮�
+window.__APP_BUILD__ = '2026-11-03-PDF-PREVIEW-17'
+
+const app = new Vue({
   el: '#app',
   router,
   store,
   render: h => h(App)
 })
+
+// 鏂囦欢棰勮锛欰pp 鍐呮寕杞界殑鍏ㄥ眬缁勪欢锛岄伩鍏嶅湪搴旂敤澶栨墜宸� $mount
+let fallbackPreview = null
+Vue.prototype.$previewFile = (files, index = 0) => {
+  if (app.$refs.filePreview) {
+    app.$refs.filePreview.open(files, index)
+    return
+  }
+  // 鍏滃簳锛欰pp 鍐呯粍浠跺皻鏈寕杞芥椂锛屼粛淇濊瘉鏈夐瑙堝叆鍙�
+  if (!fallbackPreview) {
+    const FilePreviewCtor = Vue.extend(FilePreview)
+    fallbackPreview = new FilePreviewCtor().$mount()
+    document.body.appendChild(fallbackPreview.$el)
+  }
+  fallbackPreview.open(files, index)
+}

--
Gitblit v1.9.3