Commit 7180ee9f by 无尘

fix: 修改自定义模板

parent b10d2954
...@@ -219,7 +219,6 @@ export default { ...@@ -219,7 +219,6 @@ export default {
that.isDragging = false; that.isDragging = false;
that.selectKey = ''; that.selectKey = '';
that.selectKey = evt.clone.dataset.name; that.selectKey = evt.clone.dataset.name;
console.log(evt.clone.dataset)
// 判断中间是否已经添加 // 判断中间是否已经添加
that.tempaletDataList.forEach(function(ele, index) { that.tempaletDataList.forEach(function(ele, index) {
if (ele.name == that.selectKey) { if (ele.name == that.selectKey) {
......
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
status: !!that.setData.status ? '1' : '0', status: !!that.setData.status ? '1' : '0',
time: that.setData.time time: that.setData.time
}; };
postRequest('/haoban-app-daily-web/daily/get-setting', para) postRequest('/haoban-app-daily-web/daily/create-setting', para)
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
...@@ -112,8 +112,8 @@ export default { ...@@ -112,8 +112,8 @@ export default {
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
that.setData.status = !!resData.status ? true : false; that.setData.status = resData.result.status == 1 ? true : false;
that.setData.time = resData.time; that.setData.time = resData.result.time;
return; return;
} }
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
...@@ -130,13 +130,14 @@ export default { ...@@ -130,13 +130,14 @@ export default {
brandId: function(newData, oldData) { brandId: function(newData, oldData) {
const that = this; const that = this;
that.activeBrand = newData; that.activeBrand = newData;
that.getData();
} }
}, },
mounted() { mounted() {
let that = this; let that = this;
document.documentElement.style.backgroundColor = '#f0f2f5'; document.documentElement.style.backgroundColor = '#f0f2f5';
that.$emit('showTab', '22'); that.$emit('showTab', '22');
that.getData(); // that.getData();
}, },
destroyed() { destroyed() {
document.documentElement.style.backgroundColor = '#fff'; document.documentElement.style.backgroundColor = '#fff';
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<el-tab-pane label="系统字段" name="first"> <el-tab-pane label="系统字段" name="first">
<div class="filed-item-title">交易</div> <div class="filed-item-title">交易</div>
<ul> <ul>
<draggable id="list1" :list="tradeInfo" class="compenent" :options="leftOption" :move="onMove" @start="isDragging = true" @end="itemMoveEnd" <draggable id="list1" :list="tradeInfo" class="compenent" :options="leftOption" :clone="cloneItem" :move="onMove" @start="isDragging = true" @end="itemMoveEnd"
><!-- @end="itemMoveEnd" --> ><!-- @end="itemMoveEnd" -->
<li :class="['compenent-item', item.fixed == true ? 'fixed-item' : '']" :data-name="item.name" v-for="(item, index) in tradeInfo" :key="index" aria-hidden="true"> <li :class="['compenent-item', item.fixed == true ? 'fixed-item' : '']" :data-name="item.name" v-for="(item, index) in tradeInfo" :key="index" aria-hidden="true">
<span>{{ item.title }}</span> <span>{{ item.title }}</span>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</ul> </ul>
<div class="filed-item-title">人员</div> <div class="filed-item-title">人员</div>
<ul> <ul>
<draggable id="list2" :list="personInfo" class="compenent" :options="leftOption" :move="onMove" @start="isDragging = true" @end="itemMoveEnd"> <draggable id="list2" :list="personInfo" class="compenent" :options="leftOption" :clone="cloneItem" :move="onMove" @start="isDragging = true" @end="itemMoveEnd">
<li :class="['compenent-item', item.fixed == true ? 'fixed-item' : '']" :data-name="item.name" v-for="(item, index) in personInfo" :key="index"> <li :class="['compenent-item', item.fixed == true ? 'fixed-item' : '']" :data-name="item.name" v-for="(item, index) in personInfo" :key="index">
<span>{{ item.title }}</span> <span>{{ item.title }}</span>
</li> </li>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</ul> </ul>
<div class="filed-item-title">商品</div> <div class="filed-item-title">商品</div>
<ul> <ul>
<draggable id="list3" :list="goodsInfo" class="compenent" :options="leftOption" :move="onMove" @start="isDragging = true" @end="itemMoveEnd"> <draggable id="list3" :list="goodsInfo" class="compenent" :options="leftOption" :clone="cloneItem" :move="onMove" @start="isDragging = true" @end="itemMoveEnd">
<li :class="['compenent-item', item.fixed == true ? 'fixed-item' : '']" :data-name="item.name" v-for="(item, index) in goodsInfo" :key="index"> <li :class="['compenent-item', item.fixed == true ? 'fixed-item' : '']" :data-name="item.name" v-for="(item, index) in goodsInfo" :key="index">
<span>{{ item.title }}</span> <span>{{ item.title }}</span>
</li> </li>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</ul> </ul>
<div class="filed-item-title">竞品</div> <div class="filed-item-title">竞品</div>
<ul> <ul>
<draggable id="list4" :list="competeInfo" class="compenent" :options="leftOption" :move="onMove" @start="isDragging = true" @end="itemMoveEnd"> <draggable id="list4" :list="competeInfo" class="compenent" :options="leftOption" :clone="cloneItem" :move="onMove" @start="isDragging = true" @end="itemMoveEnd">
<li :class="['compenent-item', item.fixed == true ? 'fixed-item' : '']" :data-name="item.name" v-for="(item, index) in competeInfo" :key="index"> <li :class="['compenent-item', item.fixed == true ? 'fixed-item' : '']" :data-name="item.name" v-for="(item, index) in competeInfo" :key="index">
<span>{{ item.title }}</span> <span>{{ item.title }}</span>
</li> </li>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<el-tab-pane label="自定义字段" name="second"> <el-tab-pane label="自定义字段" name="second">
<div class="filed-item-title"><!-- 其他信息 --></div> <div class="filed-item-title"><!-- 其他信息 --></div>
<ul> <ul>
<draggable id="list5" :list="defineInfo" class="compenent" :options="leftDefineOption" :move="onChildMove" @start="isDragging = true" @end="itemMoveEnd"> <draggable id="list5" :list="defineInfo" class="compenent" :options="leftDefineOption" :clone="cloneItem" :move="onChildMove" @start="isDragging = true" @end="itemMoveEnd">
<li :class="['compenent-item', item.fixed == true ? 'fixed-item' : '', item.type == 11 ? 'block-class' : '']" :data-type="item.fieldCode" v-for="(item, index) in defineInfo" :key="index"> <li :class="['compenent-item', item.fixed == true ? 'fixed-item' : '', item.type == 11 ? 'block-class' : '']" :data-type="item.fieldCode" v-for="(item, index) in defineInfo" :key="index">
<span v-if="item.type == 0">{{ item.title }}</span> <span v-if="item.type == 0">{{ item.title }}</span>
<span v-if="item.type == 1">{{ item.title }}</span> <span v-if="item.type == 1">{{ item.title }}</span>
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
<span v-if="item.fieldCode != 'baseInfo'" class="item-close p-item-close" @click.stop="deleteItem(item.name, item.parentCode, index, item)"> <span v-if="item.fieldCode != 'baseInfo'" class="item-close p-item-close" @click.stop="deleteItem(item.name, item.parentCode, index, item)">
<i class="el-icon-close"></i> <i class="el-icon-close"></i>
</span> </span>
<div v-if="!(!item.systemFlag && item.name == 'groupc7')"> <div v-if="!!item.systemFlag || !item.name.includes('groupc')">
<!-- 输入 --> <!-- 输入 -->
<input-com v-if="item.type == 1 || item.type == 2 || item.type == 3 || item.type == 10 || item.type == 9" :childItem="item"></input-com> <input-com v-if="item.type == 1 || item.type == 2 || item.type == 3 || item.type == 10 || item.type == 9" :childItem="item"></input-com>
<!-- 选择 --> <!-- 选择 -->
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
<block-com v-if="item.type == '11'" :childItem="item"></block-com> <block-com v-if="item.type == '11'" :childItem="item"></block-com>
</div> </div>
<template> <template>
<div class="block" v-if="item.name == 'groupc7'"> <div class="block" v-if="item.name.includes('groupc')">
<div class="block-head"> <div class="block-head">
<div :class="['opencard-item-title', item.title.length >= 6 ? 'title-pre-wrap' : '']">{{ item.title }}</div> <div :class="['opencard-item-title', item.title.length >= 6 ? 'title-pre-wrap' : '']">{{ item.title }}</div>
</div> </div>
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
</div> </div>
</template> </template>
<!-- 提示 组块 日期,图片没有--> <!-- 提示 组块 日期,图片没有-->
<template v-if="currentIndex == index && !item.systemFlag && (item.name != 'groupc7' && item.type != 5 && item.type != 7)"> <template v-if="currentIndex == index && !item.systemFlag && (item.type != 11 && item.type != 5 && item.type != 7)">
<div class="edit-item test-title limit-w-340" :key="'child1' + index"> <div class="edit-item test-title limit-w-340" :key="'child1' + index">
<div class="edit-item-title">提示文字最多20个字</div> <div class="edit-item-title">提示文字最多20个字</div>
<limitInput :inputWidth="340" :limitClass="'limit-color'" :inputValue.sync="item.placeholder" :holder="''" :disflag="false" :getByType="'char'" :maxLength="20"> </limitInput> <limitInput :inputWidth="340" :limitClass="'limit-color'" :inputValue.sync="item.placeholder" :holder="''" :disflag="false" :getByType="'char'" :maxLength="20"> </limitInput>
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
</div> </div>
</template> </template>
<!-- 验证 组块没有--> <!-- 验证 组块没有-->
<template v-if="currentIndex == index && item.name != 'groupc7'"> <template v-if="currentIndex == index && !item.name.includes('groupc')">
<div class="edit-item m-b-10" :key="'parent2' + index"> <div class="edit-item m-b-10" :key="'parent2' + index">
<div class="edit-item-title edit-title-padding">验证</div> <div class="edit-item-title edit-title-padding">验证</div>
<el-checkbox v-model="item.isMust" @change="changeMust($event, !!item.list, item)">必填</el-checkbox> <el-checkbox v-model="item.isMust" @change="changeMust($event, !!item.list, item)">必填</el-checkbox>
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
</div> </div>
</template> </template>
<!-- 记忆 组块没有--> <!-- 记忆 组块没有-->
<template v-if="currentIndex == index && item.name != 'groupc7'"> <template v-if="currentIndex == index && !item.name.includes('groupc')">
<div class="edit-item " :key="'parent3' + index"> <div class="edit-item " :key="'parent3' + index">
<div class="edit-item-title edit-title-padding">记忆</div> <div class="edit-item-title edit-title-padding">记忆</div>
<el-checkbox v-model="item.memory">是否记忆</el-checkbox> <el-checkbox v-model="item.memory">是否记忆</el-checkbox>
...@@ -397,21 +397,7 @@ ...@@ -397,21 +397,7 @@
</div> </div>
</div> </div>
</div> </div>
<qrcode-dialog ref="qrcodePreview" v-model="dialogVisible"></qrcode-dialog>
<div class="qr-dialog-content" style="opacity: 1;" v-show="dialogVisible">
<div class="qr-mask" @click.stop="closeDialog"></div>
<div class="qr-dialog">
<div class="qr-dialog__hd">
<strong class="qr-dialog__title">预览</strong>
<i class="el-icon-close" @click.stop="closeDialog"></i>
</div>
<div class="qr-dialog__bd">
<div id="qrcode"></div>
<div class="qr-dialog__p">请使用好办 APP 扫一扫预览</div>
</div>
<div class="qr--dialog__ft"></div>
</div>
</div>
<!-- <vue-gic-footer></vue-gic-footer> --> <!-- <vue-gic-footer></vue-gic-footer> -->
</div> </div>
</template> </template>
...@@ -424,7 +410,7 @@ import selectCom from './template/select.vue'; ...@@ -424,7 +410,7 @@ import selectCom from './template/select.vue';
import dateRangeCom from './template/date-range.vue'; import dateRangeCom from './template/date-range.vue';
import inputCom from './template/input.vue'; import inputCom from './template/input.vue';
import blockCom from './template/block.vue'; import blockCom from './template/block.vue';
import QRCode from 'qrcodejs2'; import qrcodeDialog from '@/components/app/qrcode-dialog.vue';
import showMsg from '@/common/js/showmsg'; import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error'; import errMsg from '@/common/js/error';
// import strLength from '@/common/js/strlen'; // import strLength from '@/common/js/strlen';
...@@ -456,6 +442,7 @@ export default { ...@@ -456,6 +442,7 @@ export default {
}, },
templateId: '', // 模板 id templateId: '', // 模板 id
oparateType: '', // 编辑: edit;复制: copy oparateType: '', // 编辑: edit;复制: copy
counter: 1, // 计数器
// rightOption // rightOption
selectKey: '', selectKey: '',
// 交易信息 // 交易信息
...@@ -511,10 +498,7 @@ export default { ...@@ -511,10 +498,7 @@ export default {
name: '托管门店', name: '托管门店',
disabled: false disabled: false
} }
], ]
// 二维码
qrcodeCase: '', // 二维码实例
qrcodeNum: ''
}; };
}, },
methods: { methods: {
...@@ -525,6 +509,45 @@ export default { ...@@ -525,6 +509,45 @@ export default {
let that = this; let that = this;
that.changeRoute(`/customReport?brandId=${that.brandId}`); that.changeRoute(`/customReport?brandId=${that.brandId}`);
}, },
cloneItem(original) {
let that = this;
original.cid = `c${that.counter}`;
console.log('original:', original);
if (!original.systemFlag) {
if (original.name.includes('textc')) {
original.name = `textc${that.counter}`;
}
if (original.name.includes('paragraphc')) {
original.name = `paragraphc${that.counter}`;
}
if (original.name.includes('numberc')) {
original.name = `numberc${that.counter}`;
}
if (original.name.includes('checkboxesOrRadioc')) {
original.name = `checkboxesOrRadioc${that.counter}`;
}
if (original.name.includes('datec')) {
original.name = `datec${that.counter}`;
}
if (original.name.includes('dateareac')) {
original.name = `dateareac${that.counter}`;
}
if (original.name.includes('picc')) {
original.name = `picc${that.counter}`;
}
if (original.name.includes('introductionc')) {
original.name = `introductionc${that.counter}`;
}
if (original.name.includes('pricec')) {
original.name = `pricec${that.counter}`;
}
if (original.name.includes('groupc')) {
original.name = `groupc${that.counter}`;
}
}
return original;
},
/** /**
* move{relatedContext, draggedContext} * move{relatedContext, draggedContext}
*/ */
...@@ -582,9 +605,11 @@ export default { ...@@ -582,9 +605,11 @@ export default {
} }
}); });
} }
console.log(evt,that.tempaletDataList)
that.selectKey = ''; that.selectKey = '';
that.tempaletDataList = JSON.parse(JSON.stringify(that.tempaletDataList)); that.tempaletDataList = JSON.parse(JSON.stringify(that.tempaletDataList));
that.$forceUpdate(); that.$forceUpdate();
that.counter = that.counter + 1;
}, },
// 中间部分方法 // 中间部分方法
/** /**
...@@ -607,7 +632,7 @@ export default { ...@@ -607,7 +632,7 @@ export default {
} }
// 如果是自定义的判断是不是组块 // 如果是自定义的判断是不是组块
if (!item.systemFlag) { if (!item.systemFlag) {
if (item.name == 'groupc7' && !!item.children.length) { if (item.name.includes('groupc') && !!item.children.length) {
// 设置系统的可选择 // 设置系统的可选择
item.children.forEach(ele => { item.children.forEach(ele => {
if (!!ele.systemFlag) { if (!!ele.systemFlag) {
...@@ -620,13 +645,14 @@ export default { ...@@ -620,13 +645,14 @@ export default {
}) })
} }
return false; return false;
}else {
// 删除后重新设置 fixed 值
that[pCode].forEach(function(ele, index) {
if (ele.name == key) {
ele.fixed = false;
}
});
} }
// 删除后重新设置 fixed 值
that[pCode].forEach(function(ele, index) {
if (ele.name == key) {
ele.fixed = false;
}
});
}, },
/** /**
* 添加 child * 添加 child
...@@ -751,15 +777,16 @@ export default { ...@@ -751,15 +777,16 @@ export default {
tag.filedFlag = true; tag.filedFlag = true;
tag.filedRepeat = false; tag.filedRepeat = false;
let filedArr = []; let filedArr = [];
data.forEach(function(ele, index) { data.forEach(function(ele) {
if (ele.title == '') { if (ele.title == '') {
tag.filedFlag = false; tag.filedFlag = false;
tag.name = ele.title || ''; tag.name = ele.title || '';
return false; return false;
} }
filedArr.push(ele.title);
// 判断子级 // 判断子级
if ( ele.hasOwnProperty('children') && !!ele.children.length) { if ( ele.hasOwnProperty('children') && !!ele.children.length) {
ele.children.forEach(function(el, index) { ele.children.forEach(function(el) {
if (!!el.systemFlag && el.title == '') { if (!!el.systemFlag && el.title == '') {
tag.filedFlag = false; tag.filedFlag = false;
tag.name = el.title || ''; tag.name = el.title || '';
...@@ -858,8 +885,14 @@ export default { ...@@ -858,8 +885,14 @@ export default {
// 兼容老数据 把新字段复制给老字段 // 兼容老数据 把新字段复制给老字段
ele.list = ele.children; ele.list = ele.children;
} }
}); });
if (!data.length) {
that.$message.error({
duration: 1000,
message: '请先配置字段'
});
return false;
}
// console.log(JSON.stringify(data)) // console.log(JSON.stringify(data))
if (opt === 'save') { if (opt === 'save') {
that.saveAllData(data); that.saveAllData(data);
...@@ -915,8 +948,9 @@ export default { ...@@ -915,8 +948,9 @@ export default {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
// 生成二维码需要的 url // 生成二维码需要的 url
let enterpriseId = JSON.parse(localStorage.getItem('userInfo')).enterpriseId;
let webUrl = `${window.location.origin}/office-mobile/#/staffRecordsTemplate?enterpriseId=${enterpriseId}&templateId=${resData.result}&brandId=${that.brandId}`; let webUrl = `${window.location.origin}/office-mobile/#/staffRecordsTemplate?enterpriseId=${enterpriseId}&templateId=${resData.result}&brandId=${that.brandId}`;
that.qrcode(webUrl); that.$refs.qrcodePreview.qrcode(webUrl);
that.dialogVisible = true; that.dialogVisible = true;
return; return;
} }
...@@ -931,30 +965,6 @@ export default { ...@@ -931,30 +965,6 @@ export default {
}, },
/** /**
* 生成二维码
*/
qrcode(text) {
const that = this;
if (!!that.qrcodeCase) {
document.getElementById('qrcode').innerHTML = '';
that.qrcodeCase.clear(); // 先清除原有的
}
let qrObj = {
type: 'record',
data: text
};
that.qrcodeCase = new QRCode('qrcode', {
width: 210,
height: 210, // 高度
text: JSON.stringify(qrObj), // 二维码内容 //
//render: 'canvas', // 设置渲染方式(有两种方式 table和canvas,默认是canvas) //
//background: '#f0f',
//foreground: '#ff0'
correctLevel : 3
});
},
/**
* 关闭预览窗口 * 关闭预览窗口
*/ */
closeDialog() { closeDialog() {
...@@ -1019,7 +1029,7 @@ export default { ...@@ -1019,7 +1029,7 @@ export default {
}else { }else {
ele.systemFlag = true; ele.systemFlag = true;
} }
if (ele.name == 'groupc7') { if (ele.name.includes('groupc')) {
ele.children = []; ele.children = [];
} }
}) })
...@@ -1131,15 +1141,19 @@ export default { ...@@ -1131,15 +1141,19 @@ export default {
handleGetInfo(result) { handleGetInfo(result) {
const that = this; const that = this;
let data = JSON.parse(JSON.stringify(result)); let data = JSON.parse(JSON.stringify(result));
that.setParent = []; that.cids = []; // 设置计数器
that.setParent = [];// 设置 fixed
data.forEach(function(ele, index) { data.forEach(function(ele, index) {
ele.title = (ele.title).trim(); // 返回字段有空格 ele.title = (ele.title).trim(); // 返回字段有空格
ele.isMust = !!ele.isMust ? true : false; ele.isMust = !!ele.isMust ? true : false;
ele.memory = !!ele.memory ? true : false; ele.memory = !!ele.memory ? true : false;
// 兼容老数据,增加字段 // 兼容老数据,增加字段
if (that.defineInfoFields.includes(ele.name)) { if (that.defineInfoFields.includes(ele.name)) {
// 自定义
ele.systemFlag = false; ele.systemFlag = false;
ele.parentCode = 'defineInfo';
}else { }else {
that.setParent.push(ele.name);
ele.systemFlag = true; ele.systemFlag = true;
if (ele.classify == 1) { if (ele.classify == 1) {
ele.parentCode = 'tradeInfo'; ele.parentCode = 'tradeInfo';
...@@ -1160,7 +1174,7 @@ export default { ...@@ -1160,7 +1174,7 @@ export default {
if (ele.hasOwnProperty('list') && !!ele.list && !!ele.list.length) { if (ele.hasOwnProperty('list') && !!ele.list && !!ele.list.length) {
ele.list.forEach(child => { ele.list.forEach(child => {
child.isMust = !!child.isMust ? true : false; child.isMust = !!child.isMust ? true : false;
if (ele.name == 'groupc7') { if (ele.name.includes('groupc')) {
child.title = (child.title).trim(); // 返回字段有空格 child.title = (child.title).trim(); // 返回字段有空格
child.isMust = !!child.isMust ? true : false; child.isMust = !!child.isMust ? true : false;
child.memory = !!child.memory ? true : false; child.memory = !!child.memory ? true : false;
...@@ -1168,6 +1182,7 @@ export default { ...@@ -1168,6 +1182,7 @@ export default {
if (that.defineInfoFields.includes(child.name)) { if (that.defineInfoFields.includes(child.name)) {
child.systemFlag = false; child.systemFlag = false;
}else { }else {
that.setParent.push(child.name);
child.systemFlag = true; child.systemFlag = true;
if (child.classify == 1) { if (child.classify == 1) {
child.parentCode = 'tradeInfo'; child.parentCode = 'tradeInfo';
...@@ -1183,41 +1198,42 @@ export default { ...@@ -1183,41 +1198,42 @@ export default {
} }
} }
}) })
if (ele.name.includes('groupc')) {
ele.children = ele.list;
}
} }
that.cids.push(Number.parseInt(ele.cid.match(/\d+/g)));
if (ele.hasOwnProperty('children')) { if (ele.hasOwnProperty('children')) {
ele.children.forEach(child => { ele.children.forEach(child => {
child.title = (child.title).trim(); // 返回字段有空格 child.title = (child.title).trim(); // 返回字段有空格
child.isMust = !!child.isMust ? true : false; child.isMust = !!child.isMust ? true : false;
child.memory = !!child.memory ? true : false; child.memory = !!child.memory ? true : false;
that.cids.push(Number.parseInt(child.cid.match(/\d+/g)));
}) })
} }
// 设置禁止拖拽
if (!!ele.systemFlag && ele.parentCode == 0) {
that.setParent.push(ele.fieldCode);
}
if (!!ele.systemFlag && ele.parentCode != 0) {
that.setList.push(ele.fieldCode);
}
}); });
// console.log(JSON.stringify(that.treeData(data))) // 找出最大值,设置计数器
that.counter = Math.max(...that.cids);
// console.log(JSON.stringify(data))
that.tempaletDataList = data; that.tempaletDataList = data;
/* setTimeout(function() { setTimeout(function() {
that.setFixed(); that.setFixed();
}, 100); */ }, 500);
}, },
/** /**
* 设置禁止拖拽 * 设置禁止拖拽
*/ */
setFixed() { setFixed() {
const that = this; let that = this;
that.setParent.forEach(function(ele, index) { let arr = ['tradeInfo','personInfo','goodsInfo','competeInfo'];
that[ele].forEach(function(obj, key) { arr.forEach(el => {
if (that.setList.includes(obj.fieldCode)) { that[el].forEach( ele => {
obj.fixed = true; if (that.setParent.includes(ele.name)) {
ele.fixed = true;
} }
}); });
}); })
} }
}, },
watch: { watch: {
...@@ -1240,7 +1256,8 @@ export default { ...@@ -1240,7 +1256,8 @@ export default {
selectCom, selectCom,
dateRangeCom, dateRangeCom,
inputCom, inputCom,
blockCom blockCom,
qrcodeDialog
}, },
mounted() { mounted() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment