|
@@ -5,31 +5,29 @@
|
|
<soft-header ref="headerRef" @update-soft="updateSoft()" @export-file="exportFile"></soft-header>
|
|
<soft-header ref="headerRef" @update-soft="updateSoft()" @export-file="exportFile"></soft-header>
|
|
</el-header>
|
|
</el-header>
|
|
<el-main ref="el-main" style="background-color: #fafafa;">
|
|
<el-main ref="el-main" style="background-color: #fafafa;">
|
|
- <div v-if="!menuIndex" style="padding: 30px 80px 0;">
|
|
|
|
- <div class="cmenu-item" style="padding-top: 20vh;">
|
|
|
|
- <el-row :gutter="40">
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <div class="citem-nav" >
|
|
|
|
- <img src="../assets/image/w-img.png" class="citem-img" />
|
|
|
|
- <p class="citem-name">图片水印</p>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <div class="citem-nav" >
|
|
|
|
- <img src="../assets/image/w-pdf.png" class="citem-img" />
|
|
|
|
- <p class="citem-name">PDF水印</p>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <div class="citem-nav" >
|
|
|
|
- <img src="../assets/image/w-video.png" class="citem-img" />
|
|
|
|
- <p class="citem-name">视频水印</p>
|
|
|
|
- </div>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
|
|
+
|
|
|
|
+ <el-card style="margin: 10px 20px;">
|
|
|
|
+ <div style="text-align: center;">
|
|
|
|
+ <h2>设置</h2>
|
|
|
|
+ <el-divider content-position="left">微信安装路径:</el-divider>
|
|
|
|
+ <el-input v-model="handleData.exeUrl" size="small" placeholder="输入微信安装路径" style="width: 80%;"></el-input>
|
|
|
|
+ <el-button type="primary" size="small" @click="pickPath">点击选择</el-button>
|
|
|
|
+ <el-divider content-position="left">打开数量:</el-divider>
|
|
|
|
+ <div style="margin: 20px;">
|
|
|
|
+ <el-radio-group v-model="handleData.num">
|
|
|
|
+ <el-radio :label="2">2个</el-radio>
|
|
|
|
+ <el-radio :label="3">3个</el-radio>
|
|
|
|
+ <el-radio :label="4">4个</el-radio>
|
|
|
|
+ <el-radio :label="5">5个</el-radio>
|
|
|
|
+ <el-radio :label="6">6个</el-radio>
|
|
|
|
+ <el-radio :label="8">8个</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <el-button type="danger" @click="test">保存并启动</el-button>
|
|
</div>
|
|
</div>
|
|
|
|
+ </el-card>
|
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
|
|
</el-main>
|
|
</el-main>
|
|
@@ -51,6 +49,7 @@ import electronApi from '@/utils/electronApi';
|
|
import softUpdate from './update.vue';
|
|
import softUpdate from './update.vue';
|
|
import softHeader from './header.vue';
|
|
import softHeader from './header.vue';
|
|
import pjson from '/package.json'
|
|
import pjson from '/package.json'
|
|
|
|
+const child = require("child_process");
|
|
|
|
|
|
let separator = '';
|
|
let separator = '';
|
|
if (os.platform == 'linux') {
|
|
if (os.platform == 'linux') {
|
|
@@ -73,38 +72,14 @@ export default {
|
|
isShow:false,
|
|
isShow:false,
|
|
//
|
|
//
|
|
imgUrl: this.$api.imgUrl,
|
|
imgUrl: this.$api.imgUrl,
|
|
- imgSrc: '',
|
|
|
|
-
|
|
|
|
downloadDir: '', // 默认下载目录
|
|
downloadDir: '', // 默认下载目录
|
|
handleData: {
|
|
handleData: {
|
|
- width: 0,
|
|
|
|
- height: 0,
|
|
|
|
- pathType: '2', // 保存目录类型
|
|
|
|
- newPath: os.userInfo().homedir + separator + "Downloads", // 新路径
|
|
|
|
- autoRename: false, // 是否自动重命名
|
|
|
|
- watermarkType: '1', // 水印类型 1文字 2图片
|
|
|
|
- watermarkStyle: 1, // 1 单个 2平铺
|
|
|
|
- watermarkValue: '', // 水印文字内容
|
|
|
|
- watermarkColor: 'rgba(0, 0, 0, 1)',
|
|
|
|
- watermarkFont: 20,
|
|
|
|
- watermarkX: 0,
|
|
|
|
- watermarkY: 0,
|
|
|
|
- watermarkDensityX: 3, // 平铺水印密度
|
|
|
|
- watermarkDensityY: 3, // 平铺水印密度
|
|
|
|
- watermarkImgPath: '', //图片水印路径
|
|
|
|
- watermarkImgType: '', //图片水印类型
|
|
|
|
- watermarkImgOpactiy: 100, // 水印不透明度
|
|
|
|
- scaling: 100, // 水印缩放比例
|
|
|
|
- watermarkPosition: 'Center', // 水印位置
|
|
|
|
- fonts: 'c:\\windows\\fonts\\simkai.ttf',
|
|
|
|
- rotate: 30,
|
|
|
|
- direction:'0',
|
|
|
|
- speed: 2,
|
|
|
|
|
|
+ exeUrl: '',
|
|
|
|
+ num: 2
|
|
},
|
|
},
|
|
|
|
|
|
dowloadModel: false,
|
|
dowloadModel: false,
|
|
finishModel: false,
|
|
finishModel: false,
|
|
- version: '0.0.1',
|
|
|
|
|
|
|
|
isStart: false, // 是否开始处理
|
|
isStart: false, // 是否开始处理
|
|
isUpdate: false, // 是否有更新
|
|
isUpdate: false, // 是否有更新
|
|
@@ -117,19 +92,6 @@ export default {
|
|
mounted() {
|
|
mounted() {
|
|
this.$refs.updateRef.updateSoft(true);
|
|
this.$refs.updateRef.updateSoft(true);
|
|
|
|
|
|
- let __dirname = os.userInfo().homedir;
|
|
|
|
- if(fs.existsSync(__dirname + separator + "Desktop")){
|
|
|
|
- this.downloadDir = __dirname + separator + "Desktop"
|
|
|
|
- } else{
|
|
|
|
- this.downloadDir = __dirname + separator + "Downloads"
|
|
|
|
- }
|
|
|
|
- this.handleData.newPath = this.downloadDir;
|
|
|
|
- this.previewTmpPath = os.tmpdir()+separator+'preview.png';
|
|
|
|
-
|
|
|
|
- document.addEventListener("mousemove", e => {
|
|
|
|
- e.preventDefault()
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
// 打开浏览器
|
|
// 打开浏览器
|
|
const links = document.querySelectorAll('a[href]');
|
|
const links = document.querySelectorAll('a[href]');
|
|
links.forEach(link => {
|
|
links.forEach(link => {
|
|
@@ -149,12 +111,14 @@ export default {
|
|
},
|
|
},
|
|
// 选择目录
|
|
// 选择目录
|
|
pickPath() {
|
|
pickPath() {
|
|
- this.$refs['upload-input'].blur();
|
|
|
|
- electronApi.call('pickDir', []).then((path) => {
|
|
|
|
- if (path) {
|
|
|
|
- this.handleData.newPath = path;
|
|
|
|
- this.downloadDir = path;
|
|
|
|
|
|
+ const spinLoad = this.$loading();
|
|
|
|
+ electronApi.call('pickFile', ['*', false]).then(async(files) =>{
|
|
|
|
+ if(files.length > 0){
|
|
|
|
+ this.handleData.exeUrl = files[0];
|
|
}
|
|
}
|
|
|
|
+ spinLoad.close();
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ spinLoad.close();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 打开自定义下载目录
|
|
// 打开自定义下载目录
|
|
@@ -169,6 +133,23 @@ export default {
|
|
electronApi.call('showItemInfolder',[path+'\\xy.xy'])
|
|
electronApi.call('showItemInfolder',[path+'\\xy.xy'])
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ exportFile(flag){
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ test(){
|
|
|
|
+ //参数:创建时间-访问时间-修改时间
|
|
|
|
+ let execPath = "D:/桌面/1.bat"
|
|
|
|
+ child.execFile(execPath, (err,stdout,stderr)=>{
|
|
|
|
+ console.log(err,stdout,stderr)
|
|
|
|
+ if(!err){
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -379,7 +360,7 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
.el-divider--horizontal{
|
|
.el-divider--horizontal{
|
|
- margin: 15px 0 !important;
|
|
|
|
|
|
+ margin: 40px 0 !important;
|
|
}
|
|
}
|
|
.el-divider__text{
|
|
.el-divider__text{
|
|
font-weight: 600 !important;
|
|
font-weight: 600 !important;
|