-
-
-
-
-
-
-
-
-
-
-
-
XML预览
-
{{ formattedXmlPreview }}
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
目录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ data.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ data.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
XML预览
+
{{ formattedXmlPreview }}
+
+
+
+
{{editorHeight}}
+
+
+
请打开所要编辑的的章节目录
+
请加载所要编辑的文档目录
+
+
+
+
+
+
+
+
+
+
+ 编辑目录
+ 绑定资源
+ 历史版本
+ 删除目录
+
+
+
+
+
+
+
+
+
版本名称:{{item.Name}}
+
修改时间:{{timeChange(item.CreationTime)}}
+
文件路径:{{item.Path}}
+
查看历史版本
+
+
+
+ 暂无历史版本
+
+
+
+
+
+
+
+
+ 暂未绑定资源
+
+
+
+
+
+
+
+
自定义内容
+
+
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 缩放: {{ (scale * 100).toFixed(0) }}%
+
+
+
+
+
+
+
+ 加载文件
+ 预览文件
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 使用
+ 不使用
+
+
+
+
+
+
+
+
+
+
+ 是否确定删除【{{currentNode?currentNode.name:''}}】?
+
+
+
+
+
+
+
+
+
+
+ 是否确定删除【{{nowAttr.name}}】的绑定?
+
+
+
+
+
+
+
+ 是否保存当前编辑内容1
+
+
+
+
+
+ 是否保存当前编辑内容2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 93a5d6c..86fec8e 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,6 +1,16 @@
import Vue from 'vue'
import App from './App.vue'
import axios from 'axios';
+import router from './router' // 引入路由配置
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+// 导入拖拽指令
+import draggable from './directives/draggable';
+
+
+// 全局注册指令
+Vue.directive('draggable', draggable);
+Vue.use(ElementUI);
Vue.prototype.$axios = axios;
Vue.config.productionTip = false
@@ -14,42 +24,76 @@ axios.defaults.headers.common['Authorization'] = 'Bearer token';
axios.defaults.timeout = 10000;
-window.handleMessageFromDotNet = function(msg) {
+
+
+
+let funAll = [
+ // 'FrontLoadProject',
+ 'FrontLoadDM',
+ 'GetDMDta',
+ 'SendResourcePath',
+ 'SendLisentPath',
+ 'SendProjectName',
+ 'SendNewVersionDMFileName',
+ 'GetHistoryVesions',
+ 'GetDMHistoryContent',
+ 'GetHistoryDMContent',
+ 'GetExistenceDMContent',
+ 'handPrePath',
+ 'handreContent',
+ 'SelectFilePathSend',
+ 'handleMessageFromDotNet'
+];
+for(let i =0;i
{
+export const sendToDotNet = (type, payload,id,content,lagreVersion) => {//和后端进行通讯
if (!window.chrome?.webview?.postMessage) {
console.error('WebView2 环境未就绪!当前环境:', window.chrome ? '有chrome对象' : '无chrome对象');
return;
}
// const message = JSON.stringify(type, payload)
// console.log("开始给C#发送的信息",message)
-
+ console.log('接收到的参数:', { type, payload, id, content,lagreVersion });
let message = {
- // 'Type':'',
- 'Payload':payload
+ // GetFilePath、SaveFile 取,存。
+ // LoadDM 加载DM 富文本。
+ // DragMaterial 拖拽时候告诉后端
+ // 当Type为SaveFile时,
+ // Data1为类型(PMC或者DMC) 目录PMC,富文本DMC
+ // Data2为文件编号、
+ // Data3为文件内容
+ 'Type':type||'',// AddSource
+ 'Data1':payload||'',
+ 'Data2':id||'',
+ 'Data3':content||'',
+ 'Data4':lagreVersion||'',
+ 'Data5':'',
+ 'Data6':'',
}
console.log("传参",message,JSON.stringify(message))
- window.chrome.webview.postMessage(message)
- // if (window.chrome?.webview?.postMessage) {
- // const message = JSON.stringify({ type, payload })
- // console.log("开始给C#发送的信息",message)
- // window.chrome.webview.postMessage(message)
- // } else {
- // console.warn('WebView2环境未就绪')
- // // 可选:开发环境模拟
- // if (process.env.NODE_ENV === 'development') {
- // console.log('[模拟发送]', { type, payload })
- // }
- // }
+ window.chrome.webview.postMessage(message)
+
}
+
Vue.prototype.$sendToDotNet = sendToDotNet
new Vue({
+ router, // 注册路由
render: h => h(App),
}).$mount('#app')
diff --git a/vue.config.js b/vue.config.js
index 8306d5d..3035ac1 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -15,4 +15,13 @@ module.exports = {
}
}
}
-};
\ No newline at end of file
+};
+module.exports = {
+ configureWebpack: {
+ resolve: {
+ fallback: {
+ "timers": require.resolve("timers-browserify")
+ }
+ }
+ }
+}
\ No newline at end of file