Commit 0510a583 by 高源

优化table

parent a0b8da4d
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
</div> </div>
<div style="width: 40%;display: flex; flex-direction: row;justify-content: flex-end;"> <div style="width: 40%;display: flex; flex-direction: row;justify-content: flex-end;">
<el-button size="mini" style="width: 50px;height: 20px;margin-right: 5px;">导入任务</el-button> <el-button size="mini" style="width: 50px;height: 20px;margin-right: 5px;">导入任务</el-button>
<el-button size="mini" style="width: 50px;height: 20px;margin-right: 5px;" @click="exportJson">导出任务</el-button> <el-button size="mini" style="width: 50px;height: 20px;margin-right: 5px;"
@click="exportJson">导出任务</el-button>
<el-button size="mini" style="width: 50px;height: 20px;margin-right: 15px;">保存任务</el-button> <el-button size="mini" style="width: 50px;height: 20px;margin-right: 15px;">保存任务</el-button>
</div> </div>
</div> </div>
...@@ -28,30 +29,40 @@ ...@@ -28,30 +29,40 @@
<span style="width: 63px;padding-left: 15px;font-size: 13px;">动作集合: </span> <span style="width: 63px;padding-left: 15px;font-size: 13px;">动作集合: </span>
<div class="scroll-container" @wheel="handleScroll" style="width: 325px;padding-left: 5px;"> <div class="scroll-container" @wheel="handleScroll" style="width: 325px;padding-left: 5px;">
<div class="scroll-content"> <div class="scroll-content">
<span id="Breadcrumb" @click="onBreadcrumb(item)" v-for="item in currentActionsParents" :key="item.tagId" :style="{ color: item == currentAction ? '#68C23A!important' : '#409EFF' }">{{ <span id="Breadcrumb" @click="onBreadcrumb(item)" v-for="item in currentActionsParents"
item.Name :key="item.tagId"
}}></span> :style="{ color: item == currentAction ? '#68C23A!important' : '#409EFF' }">{{
item.Name
}}></span>
</div> </div>
</div> </div>
</div> </div>
<div style="width: 10%;margin-right: 15px;display:flex;align-items: center;justify-content: flex-end;"> <div style="width: 10%;margin-right: 15px;display:flex;align-items: center;justify-content: flex-end;">
<el-button :disabled="state" type="primary" size="mini" style="width: 20px;height: 20px;" @click="newAction" id="addButton"> <el-button :disabled="state" type="primary" size="mini" style="width: 20px;height: 20px;"
@click="newAction" id="addButton">
<img style="width: 12px;height: 12px;" src="./assets/add.svg" id="addImg"> <img style="width: 12px;height: 12px;" src="./assets/add.svg" id="addImg">
</el-button> </el-button>
</div> </div>
</div> </div>
<div style="display: flex;align-items: flex-start;justify-content: space-between;width: 460px;min-height: 36px;"> <div
style="display: flex;align-items: flex-start;justify-content: space-between;width: 460px;min-height: 36px;">
<!-- 动作标签 --> <!-- 动作标签 -->
<div style="margin-bottom: 5px;margin-right: 15px;white-space: wrap;display: flex;width: 100%;"> <div style="margin-bottom: 5px;margin-right: 15px;white-space: wrap;display: flex;width: 100%;">
<draggable v-model="currentAction.actions" chosenClass="chosen" forceFallback="true" group="people" animation="1000" @start="onStart" @end="onEnd"> <draggable v-model="currentAction.actions" chosenClass="chosen" forceFallback="true" group="people"
animation="1000" @start="onStart" @end="onEnd">
<transition-group> <transition-group>
<el-tag class="boxtags" v-for="(action, index) in currentAction.actions" @click="selectTag(action)" :style="{ backgroundColor: action == activedAction ? '#68C23A!important' : '#409EFF' }" :key="action.tagId"> <el-tag class="boxtags" v-for="(action, index) in currentAction.actions"
@click="selectTag(action)"
:style="{ backgroundColor: action == activedAction ? '#68C23A!important' : '#409EFF' }"
:key="action.tagId">
<div style="display: flex;align-items: center;height: 25px;position: relative;"> <div style="display: flex;align-items: center;height: 25px;position: relative;">
<span style="min-width: 40px;display: flex;align-items: center;"> <span style="min-width: 40px;display: flex;align-items: center;">
<div class="circle">{{ index + 1 }}</div> <div class="circle">{{ index + 1 }}</div>
<span style="margin-left: 2px;">{{ action.Name }}</span> <span style="margin-left: 2px;">{{ action.Name }}</span>
</span> </span>
<img id="closeimg" @click="handleClose(action)" style="width: 17px;position: absolute;top: -6px;right: -16px;" src="./assets/close.svg"> <img id="closeimg" @click="handleClose(action)"
style="width: 17px;position: absolute;top: -6px;right: -16px;"
src="./assets/close.svg">
</div> </div>
</el-tag> </el-tag>
</transition-group> </transition-group>
...@@ -61,28 +72,36 @@ ...@@ -61,28 +72,36 @@
<el-divider></el-divider> <el-divider></el-divider>
<!-- 容器配置 --> <!-- 容器配置 -->
<div v-if="isShowAction"> <div v-if="isShowAction">
<div style="height: 35px;width: 100%;display: flex;justify-content: space-between;align-items: center;border-bottom: 1px solid rgb(165 165 165);"> <div
<div style="width: 50%;height: 100%;display: flex;align-items: center;"> style="height: 35px;width: 100%;display: flex;justify-content: space-between;align-items: center;border-bottom: 1px solid rgb(165 165 165);">
<span style="width: 59px;padding-left: 15px;">动作名称:</span>
<div> <div
<el-input class="input-new-tag dongzuo" v-model="activedAction.Name" size="small" placeholder="请输入动作名称"> style="width: 50%;height: 100%;padding-left: 15px;display: flex;align-items: center;justify-content: flex-start;">
</el-input>
</div>
</div>
<div style="width: 50%;height: 100%;padding-left: 10px;display: flex;align-items: center;justify-content: flex-start;">
<span style="width: 65px;">动作类型:</span> <span style="width: 65px;">动作类型:</span>
<div> <div>
<el-select id="eventType" name="eventType" v-model="activedAction.Alias" placeholder="请选择类型" @change="handleChange" @visible-change="handleVisibleChange" ref="mySelect" filterable remote> <el-select id="eventType" name="eventType" v-model="activedAction.Alias" placeholder="请选择类型"
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> @change="handleChange" @visible-change="handleVisibleChange" ref="mySelect" filterable
remote>
<el-option v-for="item in options" :key="item.value" :label="item.label"
:value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
<div style="width: 50%;height: 100%;display: flex;align-items: center;">
<span style="width: 59px;">动作名称:</span>
<div>
<el-input class="input-new-tag dongzuo" v-model="activedAction.Name" size="small"
placeholder="请输入动作名称">
</el-input>
</div>
</div>
</div> </div>
<div style="margin-left: 15px;margin-top: 10px;" v-if="activedAction.Alias == 'actions'"> <div style="margin-left: 15px;margin-top: 10px;" v-if="activedAction.Alias == 'actions'">
<el-button style="width: 60px !important;height: 20px !important;" @click="toActions">进入容器</el-button> <el-button style="width: 60px !important;height: 20px !important;" @click="toActions">进入容器</el-button>
</div> </div>
<component :is="dynamicComponent" @dataChanged="handleDataChange" :activedAction="activedAction" :widthResize="widthResize" v-if="activedAction.Alias !== ''"> <component :is="dynamicComponent" @dataChanged="handleDataChange" :activedAction="activedAction"
:widthResize="widthResize" v-if="activedAction.Alias !== ''">
</component> </component>
</div> </div>
</div> </div>
...@@ -580,7 +599,7 @@ export default { ...@@ -580,7 +599,7 @@ export default {
} }
.el-select .el-input__inner { .el-select .el-input__inner {
width: 145px !important; width: 120px !important;
} }
...@@ -679,5 +698,4 @@ export default { ...@@ -679,5 +698,4 @@ export default {
/*选中样式*/ /*选中样式*/
.chosen { .chosen {
border: solid 2px #3089dc !important; border: solid 2px #3089dc !important;
} }</style>
</style>
...@@ -50,6 +50,7 @@ function table () { ...@@ -50,6 +50,7 @@ function table () {
while (tableXpathArray.length > 0) { while (tableXpathArray.length > 0) {
this.cells.forEach(cell => cell.updateRelativePath(tableXpathArray));//先对所有的Cell更新下相对路径 this.cells.forEach(cell => cell.updateRelativePath(tableXpathArray));//先对所有的Cell更新下相对路径
if (this.cells.every(cell => cell.isExist())) break;//如果每个cell都存在,成功 if (this.cells.every(cell => cell.isExist())) break;//如果每个cell都存在,成功
if(tableXpathArray[tableXpathArray.length - 1]=='HTML') return
tableXpathArray.pop();//向上一级找 tableXpathArray.pop();//向上一级找
} }
if (tableXpathArray.length < 1) return _isVerified;//如果没有共同父节点,返回false if (tableXpathArray.length < 1) return _isVerified;//如果没有共同父节点,返回false
......
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