|
@@ -116,6 +116,7 @@
|
|
|
<!-- 添加发送按钮 -->
|
|
|
<el-button style="margin-left: 20px; width: 10%; font-size: 2rem" @click="sendData" :disabled="!sendBtnAble">记录</el-button>
|
|
|
<el-button style="margin-left: 20px; width: 10%; font-size: 1rem" @click="mergeByIds">合并</el-button>
|
|
|
+ <div @click="dialogVisible2=true" style="font-size: 0.3em;margin-left: 2px">替换</div>
|
|
|
</div>
|
|
|
<div style="display: flex">
|
|
|
<div v-for="item in tmpFileIds">
|
|
@@ -188,7 +189,7 @@
|
|
|
<div :id="item.resource_name"></div>
|
|
|
</div>
|
|
|
<div style="display: flex">
|
|
|
- <div v-for="item in resourceMap[item.id]" >
|
|
|
+ <div v-for="item in resourceMap[item.id]">
|
|
|
<el-image v-if="item['type'].startsWith('image')"
|
|
|
:src="'https://memos_assert.tianyunperfect.cn/' + item['internal_path'] + '?width=150'"
|
|
|
:preview-src-list="['https://memos_assert.tianyunperfect.cn/' + item['internal_path'] + '?width=750']"
|
|
@@ -279,6 +280,22 @@
|
|
|
<el-button type="primary" @click="confirmSubmit">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="替换(危险操作,不可撤销)"
|
|
|
+ :visible.sync="dialogVisible2"
|
|
|
+ width="60%"
|
|
|
+ >
|
|
|
+ <div class="contentLine">
|
|
|
+ <div>
|
|
|
+ <el-input v-model="old_text" placeholder="old"></el-input>
|
|
|
+ <el-input v-model="new_text" placeholder="new"></el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible2 = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="confirmSubmit2">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
</div>
|
|
|
<!-- 引入Quill库 -->
|
|
@@ -302,6 +319,9 @@
|
|
|
let vm = new Vue({
|
|
|
el: '#app',
|
|
|
data: {
|
|
|
+ dialogVisible2: false,
|
|
|
+ old_text: '',
|
|
|
+ new_text: '',
|
|
|
searchStr2: '',
|
|
|
searchResStr: '',
|
|
|
selectedIds: [],
|
|
@@ -723,6 +743,16 @@
|
|
|
this.allTags = res;
|
|
|
})
|
|
|
},
|
|
|
+ confirmSubmit2() {
|
|
|
+ res = requestUtil.sync("https://web_history.tianyunperfect.cn/memos/replace", 'post', {
|
|
|
+ old_text: this.old_text, new_text: this.new_text
|
|
|
+ }, {})
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.msg('替换成功');
|
|
|
+ this.search();
|
|
|
+ }
|
|
|
+ this.dialogVisible2 = false;
|
|
|
+ },
|
|
|
searchByContent: function () {
|
|
|
this.resourceMap = {};
|
|
|
// contentList 循环获取里面所有的id数组
|