修改
This commit is contained in:
3903
package-lock.json
generated
3903
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
@@ -12,22 +12,43 @@
|
|||||||
"@bytemd/plugin-gfm": "^1.22.0",
|
"@bytemd/plugin-gfm": "^1.22.0",
|
||||||
"@bytemd/plugin-highlight": "^1.22.0",
|
"@bytemd/plugin-highlight": "^1.22.0",
|
||||||
"@bytemd/vue": "^1.22.0",
|
"@bytemd/vue": "^1.22.0",
|
||||||
|
"@vueuse/core": "^5.3.0",
|
||||||
"@wangeditor/editor": "^5.1.23",
|
"@wangeditor/editor": "^5.1.23",
|
||||||
"@wangeditor/editor-for-vue": "^1.0.2",
|
"@wangeditor/editor-for-vue": "^1.0.2",
|
||||||
"@xmldom/xmldom": "^0.9.8",
|
"@xmldom/xmldom": "^0.9.8",
|
||||||
"axios": "^1.10.0",
|
"axios": "^1.10.0",
|
||||||
|
"buffer": "^6.0.3",
|
||||||
"core-js": "^3.8.3",
|
"core-js": "^3.8.3",
|
||||||
|
"crypto-browserify": "^3.12.1",
|
||||||
|
"element-ui": "^2.15.14",
|
||||||
|
"fast-xml-parser": "^5.2.5",
|
||||||
"highlight.js": "^11.11.1",
|
"highlight.js": "^11.11.1",
|
||||||
|
"html2pdf": "^0.0.11",
|
||||||
|
"html2pdf.js": "^0.10.3",
|
||||||
|
"mammoth": "^1.10.0",
|
||||||
|
"path-browserify": "^1.0.1",
|
||||||
"quill": "^1.3.7",
|
"quill": "^1.3.7",
|
||||||
"quill-image-drop-and-paste": "^2.0.1",
|
"quill-image-drop-and-paste": "^2.0.1",
|
||||||
"quill-table": "^1.0.0",
|
"quill-table": "^1.0.0",
|
||||||
"quill-table-ui": "^1.0.7",
|
"quill-table-ui": "^1.0.7",
|
||||||
|
"stream-browserify": "^3.0.0",
|
||||||
|
"three": "^0.178.0",
|
||||||
|
"timers-browserify": "^2.0.12",
|
||||||
"vditor": "^3.11.1",
|
"vditor": "^3.11.1",
|
||||||
|
"video.js": "^7.21.7",
|
||||||
|
"videojs-markers": "^1.0.1",
|
||||||
"vue": "^2.6.14",
|
"vue": "^2.6.14",
|
||||||
|
"vue-hotzone": "^1.1.0",
|
||||||
"vue-quill-editor": "^3.0.6",
|
"vue-quill-editor": "^3.0.6",
|
||||||
|
"vue-router": "^3.6.5",
|
||||||
|
"vue-video-player": "^5.0.2",
|
||||||
"wangeditor": "^4.7.15",
|
"wangeditor": "^4.7.15",
|
||||||
|
"x2js": "^3.4.4",
|
||||||
"xml-js": "^1.6.11",
|
"xml-js": "^1.6.11",
|
||||||
"xml2js": "^0.6.2"
|
"xml2js": "^0.6.2",
|
||||||
|
"xmldom": "^0.6.0",
|
||||||
|
"xmllint-wasm": "^5.0.0",
|
||||||
|
"xpath": "^0.0.34"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.12.16",
|
"@babel/core": "^7.12.16",
|
||||||
@@ -37,7 +58,10 @@
|
|||||||
"@vue/cli-service": "~5.0.0",
|
"@vue/cli-service": "~5.0.0",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-plugin-vue": "^8.0.3",
|
"eslint-plugin-vue": "^8.0.3",
|
||||||
"vue-template-compiler": "^2.6.14"
|
"libxmljs": "^1.0.11",
|
||||||
|
"raw-loader": "^4.0.2",
|
||||||
|
"vue-template-compiler": "^2.6.14",
|
||||||
|
"xmllint": "^0.1.1"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"root": true,
|
"root": true,
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<!-- <img alt="Vue logo" src="./assets/logo.png"> -->
|
<!-- <img alt="Vue logo" src="./assets/logo.png"> -->
|
||||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
<!-- <HelloWorld2 msg="Welcome to Your Vue.js App"/> -->
|
||||||
|
<HelloWorld style="display:none" msg="Welcome to Your Vue.js App"/>
|
||||||
|
<router-view/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -12,6 +14,9 @@
|
|||||||
// import HelloWorld from './components/tinyMCE.vue'
|
// import HelloWorld from './components/tinyMCE.vue'
|
||||||
// import HelloWorld from './components/vditor.vue'
|
// import HelloWorld from './components/vditor.vue'
|
||||||
import HelloWorld from './components/wang.vue'
|
import HelloWorld from './components/wang.vue'
|
||||||
|
// import HelloWorld2 from './components/wangTest.vue'
|
||||||
|
// import HelloWorld from './components/wangG.vue'
|
||||||
|
// import HelloWorld2 from './components/wangITEM.vue'
|
||||||
// import HelloWorld from './components/XMLwangS1000D.vue'
|
// import HelloWorld from './components/XMLwangS1000D.vue'
|
||||||
// import HelloWorld from './components/XMLwang.vue'
|
// import HelloWorld from './components/XMLwang.vue'
|
||||||
// import HelloWorld from './components/vditor2.vue'
|
// import HelloWorld from './components/vditor2.vue'
|
||||||
@@ -32,6 +37,6 @@ export default {
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #2c3e50;
|
color: #2c3e50;
|
||||||
margin-top: 60px;
|
/* margin-top: 60px; */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
82
src/main.js
82
src/main.js
@@ -1,6 +1,16 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import axios from 'axios';
|
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.prototype.$axios = axios;
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
@@ -14,42 +24,76 @@ axios.defaults.headers.common['Authorization'] = 'Bearer token';
|
|||||||
axios.defaults.timeout = 10000;
|
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<funAll.length;i++){
|
||||||
|
window[funAll[i]] = function(msg) {//接收后端返回路径
|
||||||
|
Vue.prototype.$dotNetMessage = msg
|
||||||
|
// 可以触发全局事件
|
||||||
|
// console.log("MAIN FrontLoadProject 2222",msg)
|
||||||
|
const event = new CustomEvent(funAll[i], { detail: msg })
|
||||||
|
window.dispatchEvent(event)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.FrontLoadProject = function(msg) {//接收后端返回路径
|
||||||
Vue.prototype.$dotNetMessage = msg
|
Vue.prototype.$dotNetMessage = msg
|
||||||
// 可以触发全局事件
|
// 可以触发全局事件
|
||||||
const event = new CustomEvent('dotnet-message', { detail: msg })
|
console.log("MAIN FrontLoadProject 2222",msg)
|
||||||
|
const event = new CustomEvent('FrontLoadProjectNew', { detail: msg })
|
||||||
window.dispatchEvent(event)
|
window.dispatchEvent(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const sendToDotNet = (type, payload,id,content,lagreVersion) => {//和后端进行通讯
|
||||||
export const sendToDotNet = (type, payload) => {
|
|
||||||
if (!window.chrome?.webview?.postMessage) {
|
if (!window.chrome?.webview?.postMessage) {
|
||||||
console.error('WebView2 环境未就绪!当前环境:', window.chrome ? '有chrome对象' : '无chrome对象');
|
console.error('WebView2 环境未就绪!当前环境:', window.chrome ? '有chrome对象' : '无chrome对象');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// const message = JSON.stringify(type, payload)
|
// const message = JSON.stringify(type, payload)
|
||||||
// console.log("开始给C#发送的信息",message)
|
// console.log("开始给C#发送的信息",message)
|
||||||
|
console.log('接收到的参数:', { type, payload, id, content,lagreVersion });
|
||||||
let message = {
|
let message = {
|
||||||
// 'Type':'',
|
// GetFilePath、SaveFile 取,存。
|
||||||
'Payload':payload
|
// 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))
|
console.log("传参",message,JSON.stringify(message))
|
||||||
window.chrome.webview.postMessage(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 })
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Vue.prototype.$sendToDotNet = sendToDotNet
|
Vue.prototype.$sendToDotNet = sendToDotNet
|
||||||
new Vue({
|
new Vue({
|
||||||
|
router, // 注册路由
|
||||||
render: h => h(App),
|
render: h => h(App),
|
||||||
}).$mount('#app')
|
}).$mount('#app')
|
||||||
|
|||||||
@@ -16,3 +16,12 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
module.exports = {
|
||||||
|
configureWebpack: {
|
||||||
|
resolve: {
|
||||||
|
fallback: {
|
||||||
|
"timers": require.resolve("timers-browserify")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user