Files
scrq-hd/.svn/pristine/6a/6adb7afaaccdfa247d67e5c78f0456e994681b2a.svn-base
2025-07-03 10:34:04 +08:00

984 lines
31 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="right-board">
<el-tabs v-model="currentTab" class="center-tabs">
<el-tab-pane label="组件属性" name="field" />
</el-tabs>
<div class="field-box">
<el-scrollbar v-if="!customTableShow" class="right-scrollbar">
<!-- 组件属性 -->
<el-form v-show="currentTab==='field' && showField" size="small" label-width="90px">
<el-form-item v-if="activeData.vModel!==undefined" label="字段名">
<el-input v-model="activeData.vModel" placeholder="请输入字段名v-model" />
</el-form-item>
<el-form-item v-if="activeData.componentName!==undefined" label="组件名">
{{ activeData.componentName }}
</el-form-item>
<el-form-item v-if="activeData.label!==undefined" label="标题">
<el-input v-model="activeData.label" placeholder="请输入标题" />
</el-form-item>
<el-form-item v-if="activeData.placeholder!==undefined" label="占位提示">
<el-input v-model="activeData.placeholder" placeholder="请输入占位提示" />
</el-form-item>
<el-form-item v-if="activeData['start-placeholder']!==undefined" label="开始占位">
<el-input v-model="activeData['start-placeholder']" placeholder="请输入占位提示" />
</el-form-item>
<el-form-item v-if="activeData['end-placeholder']!==undefined" label="结束占位">
<el-input v-model="activeData['end-placeholder']" placeholder="请输入占位提示" />
</el-form-item>
<el-form-item v-if="activeData.layout==='rowFormItem'" label="栅格间隔">
<el-input-number v-model="activeData.gutter" :min="0" placeholder="栅格间隔" />
</el-form-item>
<el-form-item v-if="activeData.align!==undefined&&activeData.type==='flex'" label="垂直排列">
<el-radio-group v-model="activeData.align">
<el-radio-button label="top" />
<el-radio-button label="middle" />
<el-radio-button label="bottom" />
</el-radio-group>
</el-form-item>
<el-form-item v-if="activeData.style&&activeData.style.width!==undefined" label="组件宽度">
<el-input v-model="activeData.style.width" placeholder="请输入组件宽度" clearable />
</el-form-item>
<el-form-item v-if="activeData.vModel!==undefined" label="默认值">
<el-input
:value="setDefaultValue(activeData.defaultValue)"
placeholder="请输入默认值"
@input="onDefaultValueInput"
/>
</el-form-item>
<el-form-item v-if="activeData.tag==='el-checkbox-group'" label="至少应选">
<el-input-number
:value="activeData.min"
:min="0"
placeholder="至少应选"
@input="$set(activeData, 'min', $event?$event:undefined)"
/>
</el-form-item>
<el-form-item v-if="activeData.tag==='el-checkbox-group'" label="最多可选">
<el-input-number
:value="activeData.max"
:min="0"
placeholder="最多可选"
@input="$set(activeData, 'max', $event?$event:undefined)"
/>
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-cascader'" label="选项分隔符">
<el-input v-model="activeData.separator" placeholder="请输入选项分隔符" />
</el-form-item>
<el-form-item v-if="activeData.min !== undefined" label="最小值">
<el-input-number v-model="activeData.min" placeholder="最小值" />
</el-form-item>
<el-form-item v-if="activeData.max !== undefined" label="最大值">
<el-input-number v-model="activeData.max" placeholder="最大值" />
</el-form-item>
<el-form-item v-if="activeData.step !== undefined" label="步长">
<el-input-number v-model="activeData.step" placeholder="步数" />
</el-form-item>
<el-form-item v-if="activeData.maxlength !== undefined" label="最大长度">
<el-input v-model="activeData.maxlength" placeholder="请输入字符长度">
</el-input>
</el-form-item>
<el-form-item v-if="activeData['active-text'] !== undefined" label="开启提示">
<el-input v-model="activeData['active-text']" placeholder="请输入开启提示" />
</el-form-item>
<el-form-item v-if="activeData['inactive-text'] !== undefined" label="关闭提示">
<el-input v-model="activeData['inactive-text']" placeholder="请输入关闭提示" />
</el-form-item>
<el-form-item v-if="activeData['active-value'] !== undefined" label="开启值">
<el-input
:value="setDefaultValue(activeData['active-value'])"
placeholder="请输入开启值"
@input="onSwitchValueInput($event, 'active-value')"
/>
</el-form-item>
<el-form-item v-if="activeData['inactive-value'] !== undefined" label="关闭值">
<el-input
:value="setDefaultValue(activeData['inactive-value'])"
placeholder="请输入关闭值"
@input="onSwitchValueInput($event, 'inactive-value')"
/>
</el-form-item>
<el-form-item
v-if="activeData.type !== undefined && 'el-date-picker' === activeData.tag"
label="时间类型"
>
<el-select
v-model="activeData.type"
placeholder="请选择时间类型"
:style="{ width: '100%' }"
@change="dateTypeChange"
>
<el-option
v-for="(item, index) in dateOptions"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="activeData.name !== undefined" label="文件字段名">
<el-input v-model="activeData.name" placeholder="请输入上传文件字段名" />
</el-form-item>
<el-form-item v-if="activeData.accept !== undefined" label="文件类型">
<el-select
v-model="activeData.accept"
placeholder="请选择文件类型"
:style="{ width: '100%' }"
clearable
>
<el-option label="图片" value="image/*" />
<el-option label="视频" value="video/*" />
<el-option label="音频" value="audio/*" />
<el-option label="excel" value=".xls,.xlsx" />
<el-option label="word" value=".doc,.docx" />
<el-option label="pdf" value=".pdf" />
<el-option label="txt" value=".txt" />
</el-select>
</el-form-item>
<el-form-item
v-if="activeData.buttonText !== undefined"
v-show="'picture-card' !== activeData['list-type']"
label="按钮文字"
>
<el-input v-model="activeData.buttonText" placeholder="请输入按钮文字" />
</el-form-item>
<el-form-item v-if="activeData['range-separator'] !== undefined" label="分隔符">
<el-input v-model="activeData['range-separator']" placeholder="请输入分隔符" />
</el-form-item>
<el-form-item v-if="activeData['picker-options'] !== undefined" label="时间段">
<el-input
v-model="activeData['picker-options'].selectableRange"
placeholder="请输入时间段"
/>
</el-form-item>
<el-form-item v-if="activeData.format !== undefined" label="时间格式">
<el-input
:value="activeData.format"
placeholder="请输入时间格式"
@input="setTimeValue($event)"
/>
</el-form-item>
<template v-if="['el-checkbox-group', 'el-radio-group', 'el-select'].indexOf(activeData.tag) > -1">
<el-divider>选项</el-divider>
<draggable
:list="activeData.options"
:animation="340"
group="selectItem"
handle=".option-drag"
>
<div v-for="(item, index) in activeData.options" :key="index" class="select-item">
<div class="select-line-icon option-drag">
<i class="el-icon-s-operation" />
</div>
<el-input v-model="item.label" placeholder="选项名" size="small" />
<el-input
placeholder="选项值"
size="small"
:value="item.value"
@input="setOptionValue(item, $event)"
/>
<div class="close-btn select-line-icon" @click="activeData.options.splice(index, 1)">
<i class="el-icon-remove-outline" />
</div>
</div>
</draggable>
<div style="margin-left: 20px;">
<el-button
style="padding-bottom: 0"
icon="el-icon-circle-plus-outline"
type="text"
@click="addSelectItem"
>
添加选项
</el-button>
</div>
<el-divider />
</template>
<template v-if="['el-cascader'].indexOf(activeData.tag) > -1">
<el-divider>选项</el-divider>
<el-form-item label="数据类型">
<el-radio-group v-model="activeData.dataType" size="small">
<el-radio-button label="dynamic">
动态
</el-radio-button>
<el-radio-button label="static">
静态
</el-radio-button>
</el-radio-group>
</el-form-item>
<template v-if="activeData.dataType === 'dynamic'">
<el-form-item label="标签键名">
<el-input v-model="activeData.labelKey" placeholder="请输入标签键名" />
</el-form-item>
<el-form-item label="值键名">
<el-input v-model="activeData.valueKey" placeholder="请输入值键名" />
</el-form-item>
</template>
<el-tree
v-if="activeData.dataType === 'static'"
draggable
:data="activeData.options"
node-key="id"
:expand-on-click-node="false"
:render-content="renderContent"
/>
<div v-if="activeData.dataType === 'static'" style="margin-left: 20px">
<el-button
style="padding-bottom: 0"
icon="el-icon-circle-plus-outline"
type="text"
@click="addTreeItem"
>
添加父级
</el-button>
</div>
<el-divider />
</template>
<el-form-item v-if="activeData['show-text'] !== undefined" label="辅助文字">
<el-switch v-model="activeData['show-text']" @change="rateTextChange" />
</el-form-item>
<el-form-item v-if="activeData['show-score'] !== undefined" label="显示分数">
<el-switch v-model="activeData['show-score']" @change="rateScoreChange" />
</el-form-item>
<el-form-item v-if="activeData['show-stops'] !== undefined" label="显示间断点">
<el-switch v-model="activeData['show-stops']" />
</el-form-item>
<el-form-item v-if="activeData.range !== undefined" label="范围选择">
<el-switch v-model="activeData.range" @change="rangeChange" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-cascader'" label="是否多选">
<el-switch v-model="activeData.props.props.multiple" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-cascader'" label="展示全路径">
<el-switch v-model="activeData['show-all-levels']" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-cascader'" label="可否筛选">
<el-switch v-model="activeData.filterable" />
</el-form-item>
<el-form-item v-if="activeData.readonly !== undefined" label="是否只读">
<el-switch v-model="activeData.readonly" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-select'" label="是否多选">
<el-switch v-model="activeData.multiple" @change="multipleChange" />
</el-form-item>
<el-form-item v-if="activeData.required !== undefined" label="是否必填">
<el-switch v-model="activeData.required" />
</el-form-item>
</el-form>
</el-scrollbar>
<el-scrollbar v-if="customTableShow" class="right-scrollbar">
<!-- 组件属性 -->
<el-form size="small" label-width="90px">
<el-form-item label="组件名称">
{{ activeData.componentName }}
</el-form-item>
<el-form-item label="行操作">
<el-button
type="primary"
icon="el-icon-plus"
@click="addTableRow"
size="mini">添加行</el-button>
</el-form-item>
<el-form-item v-if="currentCell.head" label="属性名">
<el-input v-model="currentCell.head.headProp" readonly></el-input>
</el-form-item>
<el-form-item v-if="currentCell.head" label="标题">
<el-input v-model="currentCell.head.headName"></el-input>
</el-form-item>
<el-form-item v-if="currentCell.head" label="列数">
<el-input-number v-model="currentCell.head.colSpan" :min="0" @change="headColChange"></el-input-number>
</el-form-item>
<el-form-item v-if="currentCell.head" label="删除当前" >
<el-button
type="danger"
icon="el-icon-delete"
@click="deleteCurrentHead"
size="mini">删除</el-button>
</el-form-item>
<el-form-item v-if="currentCell.head" label="前方加列">
<el-button
@click="addBefore"
type="primary"
icon="el-icon-plus"
size="mini">添加</el-button>
</el-form-item>
<el-form-item v-if="currentCell.head" label="后方加列">
<el-button
type="primary"
icon="el-icon-plus"
@click="addAfter"
size="mini">添加</el-button>
</el-form-item>
<el-form-item v-if="currentCell.children" label="子属性名">
<el-input v-model="currentCell.children.prop" readonly></el-input>
</el-form-item>
<el-form-item v-if="currentCell.children" label="子项标题">
<el-input v-model="currentCell.children.headName"></el-input>
</el-form-item>
<el-form-item v-if="currentCell.children" label="删除当前" >
<el-button
type="danger"
icon="el-icon-delete"
@click="deleteCurrentHeadChildren"
size="mini">删除</el-button>
</el-form-item>
<el-form-item v-if="currentCell.data" label="元素类型">
<el-select v-model="currentCell.data.type">
<el-option
v-for="dict in this.$dictType.getBasicTypeArry()"
:key="dict.key"
:label="dict.text"
:value="dict.key"
/>
</el-select>
</el-form-item>
<el-form-item v-if="currentCell.data" label="值">
<el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8}" v-model="currentCell.data.value" ></el-input>
</el-form-item>
<el-form-item v-if="currentCell.data" label="行数">
<el-input-number v-model="currentCell.data.rowSpan" readonly :min="1" @change="cellRowChange"></el-input-number>
</el-form-item>
<el-form-item v-if="currentCell.data" label="列数">
<el-input-number v-model="currentCell.data.colSpan" readonly :min="1" @change="cellColChange"></el-input-number>
</el-form-item>
<el-form-item v-if="currentCell.data" label="删除当前" >
<el-button
type="danger"
icon="el-icon-delete"
@click="deleteRow"
size="mini">删除</el-button>
</el-form-item>
</el-form>
</el-scrollbar>
</div>
</div>
</template>
<script>
import { isArray } from 'util'
import TreeNodeDialog from './TreeNodeDialog'
import { isNumberStr } from '@/utils/index'
import IconsDialog from './IconsDialog'
import {
inputComponents,
selectComponents,
layoutComponents
} from '@/utils/generator/config'
const dateTimeFormat = {
date: 'yyyy-MM-dd',
week: 'yyyy 第 WW 周',
month: 'yyyy-MM',
year: 'yyyy',
datetime: 'yyyy-MM-dd HH:mm:ss',
daterange: 'yyyy-MM-dd',
monthrange: 'yyyy-MM',
datetimerange: 'yyyy-MM-dd HH:mm:ss'
}
export default {
components: {
TreeNodeDialog,
IconsDialog
},
props: ['showField', 'activeData', 'formConf'],
data() {
return {
currentId:0,
currentTab: 'field',
currentNode: null,
dialogVisible: false,
iconsVisible: false,
currentIconModel: null,
dateTypeOptions: [
{
label: '日(date)',
value: 'date'
},
{
label: '周(week)',
value: 'week'
},
{
label: '月(month)',
value: 'month'
},
{
label: '年(year)',
value: 'year'
},
{
label: '日期时间(datetime)',
value: 'datetime'
}
],
dateRangeTypeOptions: [
{
label: '日期范围(daterange)',
value: 'daterange'
},
{
label: '月范围(monthrange)',
value: 'monthrange'
},
{
label: '日期时间范围(datetimerange)',
value: 'datetimerange'
}
],
colorFormatOptions: [
{
label: 'hex',
value: 'hex'
},
{
label: 'rgb',
value: 'rgb'
},
{
label: 'rgba',
value: 'rgba'
},
{
label: 'hsv',
value: 'hsv'
},
{
label: 'hsl',
value: 'hsl'
}
],
justifyOptions: [
{
label: 'start',
value: 'start'
},
{
label: 'end',
value: 'end'
},
{
label: 'center',
value: 'center'
},
{
label: 'space-around',
value: 'space-around'
},
{
label: 'space-between',
value: 'space-between'
}
],
layoutTreeProps: {
label(data, node) {
return data.componentName || `${data.label}: ${data.vModel}`
}
},
}
},
computed: {
//修改数据
customTableShow:{
get(){
return this.$store.getters.customTableShow;
},
set(val){
this.$store.dispatch("customTableShow",val)
}
},
documentLink() {
return (
this.activeData.document
|| 'https://element.eleme.cn/#/zh-CN/component/installation'
)
},
dateOptions() {
if (
this.activeData.type !== undefined
&& this.activeData.tag === 'el-date-picker'
) {
if (this.activeData['start-placeholder'] === undefined) {
return this.dateTypeOptions
}
return this.dateRangeTypeOptions
}
return []
},
tagList() {
return [
{
label: '输入型组件',
options: inputComponents
},
{
label: '选择型组件',
options: selectComponents
}
]
},
currentCell:{
get(){
return this.$store.getters.currentCell
},
set(val){
this.$store.dispatch("currentCell",val)
}
},
tableData:{
get(){
return this.$store.getters.tableData;
},
set(val){
this.$store.dispatch("tableData",val);
}
},
children:{
get(){
return this.$store.getters.children;
},
set(val){
this.$store.dispatch("children",val);
}
},
//当前ID
currentIdStore:{
get(){
return this.$store.getters.currentId;
},
set(v) {
this.$store.dispatch("currentId",v)
}
},
heads:{
get(){
return this.$store.getters.heads;
},
set(val){
this.$store.dispatch("heads",val)
}
}
},
methods: {
addReg() {
this.activeData.regList.push({
pattern: '',
message: ''
})
},
addSelectItem() {
this.activeData.options.push({
label: '',
value: ''
})
},
addTreeItem() {
++this.idGlobal
this.dialogVisible = true
this.currentNode = this.activeData.options
},
renderContent(h, { node, data, store }) {
return (
<div class="custom-tree-node">
<span>{node.label}</span>
<span class="node-operation">
<i on-click={() => this.append(data)}
class="el-icon-plus"
title="添加"
></i>
<i on-click={() => this.remove(node, data)}
class="el-icon-delete"
title="删除"
></i>
</span>
</div>
)
},
append(data) {
if (!data.children) {
this.$set(data, 'children', [])
}
this.dialogVisible = true
this.currentNode = data.children
},
remove(node, data) {
const { parent } = node
const children = parent.data.children || parent.data
const index = children.findIndex(d => d.id === data.id)
children.splice(index, 1)
},
addNode(data) {
this.currentNode.push(data)
},
setOptionValue(item, val) {
item.value = isNumberStr(val) ? +val : val
},
setDefaultValue(val) {
if (Array.isArray(val)) {
return val.join(',')
}
if (['string', 'number'].indexOf(val) > -1) {
return val
}
if (typeof val === 'boolean') {
return `${val}`
}
return val
},
onDefaultValueInput(str) {
if (isArray(this.activeData.defaultValue)) {
// 数组
this.$set(
this.activeData,
'defaultValue',
str.split(',').map(val => (isNumberStr(val) ? +val : val))
)
} else if (['true', 'false'].indexOf(str) > -1) {
// 布尔
this.$set(this.activeData, 'defaultValue', JSON.parse(str))
} else {
// 字符串和数字
this.$set(
this.activeData,
'defaultValue',
isNumberStr(str) ? +str : str
)
}
},
onSwitchValueInput(val, name) {
if (['true', 'false'].indexOf(val) > -1) {
this.$set(this.activeData, name, JSON.parse(val))
} else {
this.$set(this.activeData, name, isNumberStr(val) ? +val : val)
}
},
setTimeValue(val, type) {
const valueFormat = type === 'week' ? dateTimeFormat.date : val
this.$set(this.activeData, 'defaultValue', null)
this.$set(this.activeData, 'value-format', valueFormat)
this.$set(this.activeData, 'format', val)
},
spanChange(val) {
this.formConf.span = val
},
multipleChange(val) {
this.$set(this.activeData, 'defaultValue', val ? [] : '')
},
dateTypeChange(val) {
this.setTimeValue(dateTimeFormat[val], val)
},
rangeChange(val) {
this.$set(
this.activeData,
'defaultValue',
val ? [this.activeData.min, this.activeData.max] : this.activeData.min
)
},
rateTextChange(val) {
if (val) this.activeData['show-score'] = false
},
rateScoreChange(val) {
if (val) this.activeData['show-text'] = false
},
colorFormatChange(val) {
this.activeData.defaultValue = null
this.activeData['show-alpha'] = val.indexOf('a') > -1
this.activeData.renderKey = +new Date() // 更新renderKey,重新渲染该组件
},
openIconsDialog(model) {
this.iconsVisible = true
this.currentIconModel = model
},
setIcon(val) {
this.activeData[this.currentIconModel] = val
},
tagChange(tagIcon) {
let target = inputComponents.find(item => item.tagIcon === tagIcon)
if (!target) target = selectComponents.find(item => item.tagIcon === tagIcon)
this.$emit('tag-change', target)
},
//点击标题头
headColChange(cValue,oValue){
console.log(this.$store.getters.currentCell.head)
//添加行
let headProp=this.$store.getters.currentCell.head.headProp;
if (cValue>oValue){
let child={
headProp,
prop:headProp+"_"+(cValue-1),
headName:"",
}
this.children.push(child);
}
},
//后方加列
addAfter(){
let sub;
this.heads.forEach((value,i)=>{
if (value.headProp==this.currentCell.head.headProp){
sub=i;
}
})
this.currentIdStore=this.currentIdStore+1;
let newHead= {
colSpan: 0,
headName: '标题'+this.currentIdStore,
headProp: 'head'+this.currentIdStore
}
this.heads.splice(sub+1,0,newHead)
this.tableData.forEach((val,index)=>{
let data={
type:1,
colSpan:1,
rowSpan:1,
rowNum:index,
value:"",
headProp:'head'+this.currentIdStore
}
val['head'+this.currentIdStore]=data
})
},
addBefore(){
let sub;
this.heads.forEach((value,i)=>{
if (value.headProp==this.currentCell.head.headProp){
sub=i;
}
})
this.currentIdStore=this.currentIdStore+1;
let newHead= {
colSpan: 0,
headName: '标题'+this.currentIdStore,
headProp: 'head'+this.currentIdStore
}
this.heads.splice(sub,0,newHead)
this.tableData.forEach((val,index)=>{
let data={
type:1,
colSpan:1,
rowSpan:1,
rowNum:index,
value:"",
headProp:'head'+this.currentIdStore
}
val['head'+this.currentIdStore]=data
})
},
deleteCurrentHead(){
let sub;
let deleteHead=this.currentCell.head.headProp;
this.heads.forEach((value,i)=>{
if (value.headProp==this.currentCell.head.headProp){
sub=i;
}
})
this.heads.splice(sub,1)
this.tableData.forEach((val,index)=>{
val[deleteHead]=undefined;
})
let cCell={
head:this.heads[sub]
}
this.currentCell=cCell;
},
//删除子元素
deleteCurrentHeadChildren(){
let index;
this.children.forEach((val,idx)=>{
if (this.currentCell.children.prop==val.prop){
index=idx;
}
})
this.children.splice(index,1);
},
//
cellRowChange(cVal,oVal){
if (cVal>oVal){//添加单元格
let data=[];
let i=0;
this.tableData.forEach((val)=>{
if (this.currentCell.data.rowNum<val[Object.keys(val)[0]].rowNum
&&val[Object.keys(val)[0]].rowNum<= (this.currentCell.data.rowNum+cVal-1)) {
data[i]=val;
i++;
}
})
data.forEach(value => {
value[this.currentCell.data.headProp].colSpan=0;
value[this.currentCell.data.headProp].value=""
})
}else {//缩小单元格
let data=[];
let i=0;
this.tableData.forEach((val)=>{
if (this.currentCell.data.rowNum<val[Object.keys(val)[0]].rowNum
&&val[Object.keys(val)[0]].rowNum<= (this.currentCell.data.rowNum+oVal-1)) {
data[i]=val;
i++;
}
})
data.forEach(value => {
value[this.currentCell.data.headProp].colSpan=1;
value[this.currentCell.data.headProp].value=""
})
}
},
cellColChange(cVal,oVal){
let current={};
this.tableData.forEach(val=>{
if (val[Object.keys(val)[0]].rowNum==this.currentCell.data.rowNum){
current=val;
}
})
if (cVal>oVal){
let number = Object.keys(current).indexOf(this.currentCell.data.headProp)
Object.keys(current).forEach((val,index)=>{
if (number<index&&index <=(number+cVal-1)){
current[val].colSpan=0
current[val].value=""
}
})
// console.log(this.currentCell.data,current)
}else {
let number = Object.keys(current).indexOf(this.currentCell.data.headProp)
console.log("number+this.currentCell.data.colSpan",number+this.currentCell.data.colSpan)
Object.keys(current).forEach((val,index)=>{
console.log("===>>>>",index)
if ((number+this.currentCell.data.colSpan-1)==index){
current[val].colSpan=1
current[val].value=""
}
// if (number<index&&index <=(number+oVal-1)){
// current[val].colSpan=1
// current[val].value=""
// }
})
}
},
addTableRow(){
this.$store.getters.customerThis.addRow()
},
deleteRow(){
console.log(this.currentCell.data.rowNum);
this.tableData.splice(this.currentCell.data.rowNum,1);
this.tableData.forEach((val,index)=>{
if (index==this.currentCell.data.rowNum){
Object.keys(val).forEach(k=>{
val[k].rowNum--;
})
}
})
this.currentCell={};
}
}
}
</script>
<style lang="scss" scoped>
.right-board {
width: 250px;
position: absolute;
right: 0;
top: 0;
padding-top: 3px;
.field-box {
position: relative;
height: calc(100vh - 42px);
box-sizing: border-box;
overflow: hidden;
}
.el-scrollbar {
height: 100%;
}
}
.select-item {
display: flex;
border: 1px dashed #fff;
box-sizing: border-box;
& .close-btn {
cursor: pointer;
color: #f56c6c;
}
& .el-input + .el-input {
margin-left: 4px;
}
}
.select-item + .select-item {
margin-top: 4px;
}
.select-item.sortable-chosen {
border: 1px dashed #409eff;
}
.select-line-icon {
line-height: 32px;
font-size: 22px;
padding: 0 4px;
color: #777;
}
.option-drag {
cursor: move;
}
.time-range {
.el-date-editor {
width: 227px;
}
::v-deep .el-icon-time {
display: none;
}
}
.document-link {
position: absolute;
display: block;
width: 26px;
height: 26px;
top: 0;
left: 0;
cursor: pointer;
background: #409eff;
z-index: 1;
border-radius: 0 0 6px 0;
text-align: center;
line-height: 26px;
color: #fff;
font-size: 18px;
}
.node-label{
font-size: 14px;
}
.node-icon{
color: #bebfc3;
}
</style>