This commit is contained in:
lq 2024-07-09 16:09:01 +08:00
parent bbea392a03
commit b702bccafa

View File

@ -18,7 +18,7 @@ import TheWelcome from './components/TheWelcome.vue'
<div class="menu-item__redo" @click="executeRedo"> <div class="menu-item__redo" @click="executeRedo">
<i></i> <i></i>
</div> </div>
<div class="menu-item__painter" title="格式刷(双击可连续使用)" @lclick="painterDom" @dbclick="dbPainterDom"> <div class="menu-item__painter" title="格式刷(双击可连续使用)" @click="painterDom" @dblclick="dbPainterDom">
<i></i> <i></i>
</div> </div>
<div class="menu-item__format" title="清除格式" @click="executeFormat"> <div class="menu-item__format" title="清除格式" @click="executeFormat">
@ -494,7 +494,7 @@ import Editor, {
TitleLevel TitleLevel
} from '@hufe921/canvas-editor' } from '@hufe921/canvas-editor'
import axios from 'axios' import axios from 'axios'
import draggable from "vuedraggable" import { ElMessage } from 'element-plus'
import QRCode from 'qrcodejs2-fix' import QRCode from 'qrcodejs2-fix'
import { Dialog } from './components/dialog/Dialog' import { Dialog } from './components/dialog/Dialog'
export default { export default {
@ -666,11 +666,15 @@ export default {
getHTMLValuea() { getHTMLValuea() {
const ccc = this.instance.command.getValue() const ccc = this.instance.command.getValue()
//console.log(ccc) //console.log(ccc)
localStorage.setItem('word_data', JSON.stringify(ccc.data)) //localStorage.setItem('word_data', JSON.stringify(ccc.data))
let saveData = {'type':this.orderType, 'field_style':ccc.data} let saveData = {'type':this.orderType, 'field_style':ccc.data}
let api = '/api/Administrator/OrderFieldStyle/save' let api = '/api/Administrator/OrderFieldStyle/save'
axios.post(api, saveData).then((res) => { axios.post(api, saveData).then((res) => {
ElMessage({
message: res.data.msg,
type: res.data.code == 1 ? 'success' : 'error',
plain: true,
})
}) })
//this.getTest(ccc.data.main[2].value) //this.getTest(ccc.data.main[2].value)
@ -835,6 +839,7 @@ export default {
}, },
init(showData) { init(showData) {
let _this = this let _this = this
let api = '/api/Administrator/OrderFieldStyle/getUserConfig?type=1' let api = '/api/Administrator/OrderFieldStyle/getUserConfig?type=1'
const res = axios.get(api).then((res) => { const res = axios.get(api).then((res) => {
@ -1277,6 +1282,10 @@ export default {
colorControlDom.value = '#000000' colorControlDom.value = '#000000'
colorSpanDom.style.backgroundColor = '#000000' colorSpanDom.style.backgroundColor = '#000000'
} }
const painterDom = document.querySelector('.menu-item__painter')
payload.painter
? painterDom.classList.add('active')
: painterDom.classList.remove('active')
} }
}, },