| | |
| | | import DxfParser from 'dxf-parser'; |
| | | import { Leafer, Polygon,Ellipse,Line,Path } from 'leafer-ui' |
| | | import {round} from "xe-utils"; |
| | | import {add} from '@/utils/decimal' |
| | | const { t } = useI18n() |
| | | |
| | | const router = useRouter() |
| | |
| | | const company = companyInfo() |
| | | const xGrid = ref() |
| | | const trademarkLocation=ref([t('craft.upperLeft'),t('craft.upperRight'),t('craft.lowLeft'),t('craft.lowRight')]) |
| | | const qrcodeLocation=ref({}) |
| | | |
| | | |
| | | const gridOptions = reactive({ |
| | | loading:true, |
| | | border: "full",//表格加边框 |
| | |
| | | } |
| | | case 'computedSize' :{ |
| | | let result = toolbarButtonClickEvent() |
| | | if(!result || result.cell!=='childWidth'){ |
| | | if(!result || !(result.cell==='childWidth' || result.cell==='childHeight')){ |
| | | break |
| | | } |
| | | ElMessageBox.prompt('', '', { |
| | |
| | | const value1 = value*1 |
| | | $grid.getTableData().visibleData.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | |
| | | item[result.cell] = item[result.cell]*1+value1 |
| | | item[result.cell] =add(item[result.cell]*1,value1) |
| | | } |
| | | |
| | | }) |
| | |
| | | xMargin:30, |
| | | yMargin:30, |
| | | location:[], |
| | | qrcode1:{ |
| | | xMargin:10, |
| | | yMargin:10, |
| | | qr1:{ |
| | | x:10, |
| | | y:10, |
| | | location:[] |
| | | }, |
| | | qrcode2:{ |
| | | xMargin:10, |
| | | yMargin:10, |
| | | qr2:{ |
| | | x:10, |
| | | y:10, |
| | | location:[] |
| | | } |
| | | |
| | |
| | | trademarkVisible.value= true |
| | | if(row.icon!=null && row.icon!==''){ |
| | | let trademark = JSON.parse(row.icon) |
| | | if(trademark.qrcode2 === undefined){ |
| | | if(trademark.qr2 === undefined){ |
| | | trademark.width = null |
| | | trademark.height = null |
| | | trademark.qrcode1 = { |
| | | xMargin:10, |
| | | yMargin:10, |
| | | trademark.qr1 = { |
| | | x:10, |
| | | y:10, |
| | | location:t('craft.lowLeft'), |
| | | } |
| | | trademark.qrcode2 = { |
| | | xMargin:10, |
| | | yMargin:10, |
| | | trademark.qr2 = { |
| | | x:10, |
| | | y:10, |
| | | location:t('craft.upperRight') |
| | | } |
| | | } |
| | |
| | | xMargin:30, |
| | | yMargin:30, |
| | | location:t('craft.lowLeft'), |
| | | qrcode1:{ |
| | | xMargin:10, |
| | | yMargin:10, |
| | | qr1:{ |
| | | x:10, |
| | | y:10, |
| | | location:t('craft.lowLeft'), |
| | | }, |
| | | qrcode2:{ |
| | | xMargin:10, |
| | | yMargin:10, |
| | | qr2:{ |
| | | x:10, |
| | | y:10, |
| | | location:t('craft.upperRight') |
| | | } |
| | | } |
| | |
| | | //初始化判断是否有id传入 |
| | | onMounted(()=>{ |
| | | addListener(xGrid.value,gridOptions) |
| | | qrcodeLocation.value[t('craft.default')] = "" |
| | | trademarkLocation.value.forEach(item =>{ |
| | | qrcodeLocation.value[item] = item |
| | | }) |
| | | const str = route.query.orderId |
| | | if (typeof str === 'undefined' || str === null || str === '' || str === '\n' || str === '\r'){ |
| | | return |
| | |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | @closed="handleClosed" |
| | | style="width: 922px;height:750px;margin-top: 100px ; |
| | | style="width: 1122px;height:750px;margin-top: 100px ; |
| | | position: relative;" > |
| | | <div style="width: 50%;height: 100%;float: left"> |
| | | <el-row style=""> |
| | |
| | | <el-row> |
| | | <el-col :span="5">{{$t('craft.qr1Local')}}:</el-col> |
| | | <el-col :span="25"> |
| | | <el-radio v-model="trademarkAttr.qrcode1.location" v-for="item in trademarkLocation" :label="item" /> |
| | | <el-radio v-model="trademarkAttr.qr1.location" |
| | | v-for="(item,keys) in qrcodeLocation" |
| | | :value="item" |
| | | > |
| | | {{keys}} |
| | | </el-radio> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="5">X:</el-col> |
| | | <el-col :span="6"> |
| | | <el-input-number v-model="trademarkAttr.qrcode1.xMargin"/> |
| | | <el-input-number v-model="trademarkAttr.qr1.x"/> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | <el-row> |
| | | <el-col :span="5">Y:</el-col> |
| | | <el-col :span="6"> |
| | | <el-input-number v-model="trademarkAttr.qrcode1.yMargin"/> |
| | | <el-input-number v-model="trademarkAttr.qr1.y"/> |
| | | </el-col> |
| | | </el-row> |
| | | <!--二维码2--> |
| | |
| | | <el-row> |
| | | <el-col :span="5">{{$t('craft.qr2Local')}}:</el-col> |
| | | <el-col :span="25"> |
| | | <el-radio v-model="trademarkAttr.qrcode2.location" v-for="item in trademarkLocation" :label="item" /> |
| | | <el-radio v-model="trademarkAttr.qr2.location" |
| | | v-for="(item,keys) in qrcodeLocation" |
| | | :value="item" |
| | | > |
| | | {{keys}} |
| | | </el-radio> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="5">X:</el-col> |
| | | <el-col :span="6"> |
| | | <el-input-number v-model="trademarkAttr.qrcode2.xMargin"/> |
| | | <el-input-number v-model="trademarkAttr.qr2.x"/> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | <el-row> |
| | | <el-col :span="5">Y:</el-col> |
| | | <el-col :span="6"> |
| | | <el-input-number v-model="trademarkAttr.qrcode2.yMargin"/> |
| | | <el-input-number v-model="trademarkAttr.qr2.y"/> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | position: relative;display: flex;justify-content: center;align-content: center;"> |
| | | |
| | | <div id="mains" ref="parent" > |
| | | <div id="iocn" ref="draggable" |
| | | <div id="icon" ref="draggable" |
| | | v-if="tagCheck(t('craft.upperLeft'))" |
| | | :style="{marginLeft:trademarkAttr.xMargin/big+'px',marginTop:trademarkAttr.yMargin/big+'px'}" |
| | | style="width: 20px;height: 20px;left: 0;top: 0;background-color: red;position: absolute;" |
| | |
| | | > |
| | | <el-image @dblclick="trademarkenlargement" style="width: 100%;height: 100%" :src="iconNickname"/> |
| | | </div> |
| | | <div id="iocn" ref="draggable" v-if="tagCheck(t('craft.upperRight'))" @mousedown="startDragUpperRight" :style="{marginRight:trademarkAttr.xMargin/big+'px',marginTop:trademarkAttr.yMargin/big+'px'}" style="width: 20px;height: 20px;right: 0;top: 0;background-color: red;position: absolute;"> |
| | | <div id="icon" ref="draggable" v-if="tagCheck(t('craft.upperRight'))" @mousedown="startDragUpperRight" :style="{marginRight:trademarkAttr.xMargin/big+'px',marginTop:trademarkAttr.yMargin/big+'px'}" style="width: 20px;height: 20px;right: 0;top: 0;background-color: red;position: absolute;"> |
| | | <el-image @dblclick="trademarkenlargement" style="width: 100%;height: 100%" :src="iconNickname"/> |
| | | </div> |
| | | <div id="iocn" ref="draggable" v-if="tagCheck(t('craft.lowLeft'))" @mousedown="startDragLowLeft" :style="{marginLeft:trademarkAttr.xMargin/big+'px',marginBottom:trademarkAttr.yMargin/big+'px'}" style="width: 20px;height: 20px;left: 0;bottom: 0;background-color: red;position: absolute;"> |
| | | <div id="icon" ref="draggable" v-if="tagCheck(t('craft.lowLeft'))" @mousedown="startDragLowLeft" :style="{marginLeft:trademarkAttr.xMargin/big+'px',marginBottom:trademarkAttr.yMargin/big+'px'}" style="width: 20px;height: 20px;left: 0;bottom: 0;background-color: red;position: absolute;"> |
| | | <el-image @dblclick="trademarkenlargement" style="width: 100%;height: 100%" :src="iconNickname"/> |
| | | </div> |
| | | <div id="iocn" ref="draggable" v-if="tagCheck(t('craft.lowRight'))" @mousedown="startDragLowRight" :style="{marginRight:trademarkAttr.xMargin/big+'px',marginBottom:trademarkAttr.yMargin/big+'px'}" style="width: 20px;height: 20px;right: 0;bottom: 0;background-color: red;position: absolute;"> |
| | | <div id="icon" ref="draggable" v-if="tagCheck(t('craft.lowRight'))" @mousedown="startDragLowRight" :style="{marginRight:trademarkAttr.xMargin/big+'px',marginBottom:trademarkAttr.yMargin/big+'px'}" style="width: 20px;height: 20px;right: 0;bottom: 0;background-color: red;position: absolute;"> |
| | | <el-image @dblclick="trademarkenlargement" style="width: 100%;height: 100%" :src="iconNickname"/> |
| | | </div> |
| | | <canvas id="canvas" ></canvas> |
| | |
| | | |
| | | |
| | | </div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 33px;left: 652px;">{{orderDetailWidth}}</div> |
| | | <div id="height" style="width: 60px;position: absolute;top: 178px;left: 390px;">{{orderDetailHeight}}</div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 33px;left: 752px;">{{orderDetailWidth}}</div> |
| | | <div id="height" style="width: 60px;position: absolute;top: 178px;right: 100px;">{{orderDetailHeight}}</div> |
| | | <div style="float: left;margin-top: 20px;margin-left: 80px"> |
| | | <el-input class="contactNumber" @blur="getproject" type="text" v-model="data1" /> |
| | | <el-input class="contactNumber" @blur="getproject" type="text" v-model="data2" /> |
| | |
| | | <el-input class="contactNumber" @blur="getproject" type="text" v-model="data7" /> |
| | | <el-input class="contactNumber" @blur="getproject" type="text" v-model="data8" /><br> |
| | | </div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 332px;left: 520px;">{{$t('order.upper')}}</div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 354px;left: 520px;">{{$t('order.down')}}</div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 312px;left: 562px;">{{$t('order.horizontal')}}</div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 312px;left: 625px;">{{$t('order.vertical')}}</div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 312px;left: 695px;">{{$t('order.horizontal')}}</div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 312px;left: 760px;">{{$t('order.vertical')}}</div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 332px;left: 520px;margin-left: 80px">{{$t('order.upper')}}</div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 354px;left: 520px;margin-left: 80px">{{$t('order.down')}}</div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 312px;left: 562px;margin-left: 80px">{{$t('order.horizontal')}}</div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 312px;left: 625px;margin-left: 80px">{{$t('order.vertical')}}</div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 312px;left: 695px;margin-left: 80px">{{$t('order.horizontal')}}</div> |
| | | <div id="width" style="height: 20px;position: absolute;top: 312px;left: 760px;margin-left: 80px">{{$t('order.vertical')}}</div> |
| | | <div v-if="enlargementFlag" style="width: 400px;height: 250px;float: left;position: relative;background-color: red"> |
| | | <el-image @dblclick="trademarkenlargement" style="z-index: 9999;max-width: 100%;max-height: 100%" :src="iconNickname"/> |
| | | </div> |