Commit a0757b67 by 高源

动作流功能初版

parent 4d9f974c
No preview for this file type
<template>
<!-- <router-view></router-view>
-->
<div id="realcontent">
<div id="EasySpiderResizer"
style="width: 10px; height: 10px; position: absolute; left: 0; top: 0; cursor: nw-resize;"> </div>
<div>
<!-- 页头信息 -->
<div class="tooldrag">
<img style="width: 20px;height: 20px;" src="./assets/logo.png">
<span style="padding-left: 3px;">K5 网页自动化工具</span>
</div>
<!-- 任务信息 -->
<div style="display: flex;align-items: center;height: 60px;">
<div style="width: 85%;display: flex;flex-direction: column;text-align: left;">
<div style="width: 100%;height: 25px;display: flex;align-items: center;padding-left: 10px;">
<span style="width: 95px;padding-left: 5px;">任务名称:</span>
<el-input v-model="taskName" placeholder="请输入内容" style="height: 20px;"></el-input>
</div>
<div style="width: 100%;height: 25px;display: flex;align-items: center;padding-left: 10px;">
<span style="width: 95px; padding-left: 5px;">任务地址:</span>
<el-input v-model="taskAddress" placeholder="请输入内容" style="height: 20px;" disabled></el-input>
</div>
</div>
<div style="display: flex;flex-direction: column;">
<el-button size="mini" style="width: 60px;height: 25px;margin-bottom: 5px;margin-left: 10px;"
@click="submitForm">保存任务</el-button>
<el-button size="mini" style="width: 60px;height: 25px;" @click="newAction">新建动作</el-button>
</div>
</div>
<el-divider></el-divider>
<!-- 动作集合 -->
<div
style="margin-bottom: 5px;margin-left: 15px;margin-right: 15px;width: 470px;overflow: auto;white-space: nowrap;display: flex;">
<el-button @click="goback">返回</el-button>
<draggable v-model="dynamicTags" chosenClass="chosen" forceFallback="true" group="people" animation="1000"
@start="onStart" @end="onEnd">
<transition-group>
<!-- <div class="item" v-for="element in myArray" :key="element.id">{{ element.name }}</div> -->
<el-tag class="boxtags" :key="tag.Kvid" v-for="tag in allArray" closable
:disable-transitions="false" @close="handleClose(tag)" @click="selectTag(tag)"
v-if="ischTree == false && childrenTree.length >= 0">
{{ tag.actionName }}
</el-tag>
<el-tag class="boxtags" v-if="childrenTree.length > 0 || ischTree == true" :key="item.Kvid"
v-for="item in childrenTree" closable :disable-transitions="false" @close="handleClose(item)"
@click="selectTag(item)">
{{ item.actionName }}
</el-tag>
<!-- <el-tag class="boxtags" :key="index" v-for="(item, index) in dynamicTags" closable :disable-transitions="false" @close="handleClose(index)">
{{ item.actionName }}
</el-tag> -->
</transition-group>
</draggable>
</div>
<el-divider></el-divider>
<!-- 动作配置 -->
<el-card class="box-card" v-if="inputVisible">
<div style="height: 35px;display: flex;justify-content: space-evenly;align-items: center;">
<span>动作配置:</span>
<div style="width: 211px;display: flex;align-items: center;">
<span style="width: 90px;">动作名称:</span>
<!-- ref="saveTagInput" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" -->
<el-input class="input-new-tag dongzuo" v-model="actionName" size="small" placeholder="请输入动作名称">
</el-input>
</div>
<div style="margin-right: 5px;">
<span style="width: 90px;">动作类型:</span>
<el-select id="eventType" name="eventType" v-model="actionType" placeholder="请选择类型"
@change="handleChange">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
<div v-if="actionType == 'actions'">
<el-button @click="toActions">进入容器</el-button>
</div>
</div>
<!-- 点击动作 -->
<div style="background-color: white;" v-if="actionType == 'elClick'">
<div style="height: 35px;margin-left: 15px;text-align: left;">
<el-button size="small" style="" class="button-new-tag" @click="selectElement">选择元素</el-button>
<span style="margin-left: 3px;">元素信息如下:</span>
</div>
<!-- 表格信息 -->
<vxe-table :data="tableData" ref="xTable" border class="mytable-scrollbar" height="220">
<vxe-column field="xpath" title="xpath"></vxe-column>
<vxe-column field="content" title="content"></vxe-column>
<vxe-column title="操作" width="100">
<template #default="{ row }">
<vxe-button status="danger" content="删除" @click="deleteRowEvent(row)"
style="margin-right: 20px;width: 50px;"></vxe-button>
</template>
</vxe-column>
</vxe-table>
</div>
<!-- 右击动作 -->
<div v-if="actionType == 'rightclick'">
右击
</div>
<!-- 提交动作 -->
<div v-if="actionType == 'submit'">
提交动作
</div>
<!-- 等待动作 -->
<div v-if="actionType == 'wait'">
等待动作
</div>
<!-- 输入动作 -->
<div v-if="actionType == 'input'">
输入动作
</div>
<!-- 选择动作 -->
<div v-if="actionType == 'select'">
选择动作
</div>
<!-- 鼠标移动 -->
<div v-if="actionType == 'mouseMove'">
鼠标移动
</div>
<!-- 脚本执行 -->
<div v-if="actionType == 'pageJavascipt'">
脚本执行
</div>
<!-- 循环点击 -->
<div v-if="actionType == 'loopClick'">
循环点击
</div>
<!-- 采集单元素 -->
<div v-if="actionType == 'collectSingleElements'">
采集单元素
</div>
<!-- 采集表 -->
<div v-if="actionType == 'collectionTable'">
采集表
</div>
<!-- 关闭页面 -->
<div v-if="actionType == 'pageClose'">
关闭页面
</div>
</el-card>
</div>
</div>
</template>
<script>
import VXETable from 'vxe-table'
import draggable from 'vuedraggable'
export default {
name: 'App',
components: { draggable },
props: {},
data () {
return {
taskName: '',
taskAddress: 'https://k5.kivii.org/storages/app/files/bundle.js',
actionName: '',
actionType: '',
dynamicTags: [],
inputVisible: false,
options: [{
value: 'elClick',
label: '点击'
}, {
value: 'rightclick',
label: '右击'
}, {
value: 'submit',
label: '提交'
}, {
value: 'wait',
label: '等待'
}, {
value: 'input',
label: '输入'
}, {
value: 'select',
label: '选择'
}, {
value: 'mouseMove',
label: '鼠标移动'
}, {
value: 'pageJavascipt',
label: '脚本执行'
}, {
value: 'loopClick',
label: '循环点击'
}, {
value: 'collectSingleElements',
label: '采集单元素'
}, {
value: 'collectionTable',
label: '采集表'
}, {
value: 'pageClose',
label: '关闭页面'
}, {
value: 'actions',
label: '容器'
}],
tableData: [],
drag: false,
allData: [],
tagId: 0,
dynamicTagObj: {},
tableDataID: 0,
parentTree: [],
childrenTree: [],
kvid: null,
parentKvid: null,
ischTree: false,
allArray: [
],
selectr: {}
}
},
created () { },
mounted () {
this.$nextTick(() => {
window.addEventListener('resize', this.onResize);
});
this.$watch('dynamicTagObj.actionName', (newVal, oldVal) => {
this.dynamicTagObj.actionName = newVal
});
},
watch: {
actionName (newVal, oldVal) {
// 在输入值发生变化时触发
if (newVal !== oldVal) {
console.log(newVal)
console.log(this.dynamicTags)
const targetObject = this.dynamicTags.find(obj => obj.tagId === this.dynamicTagObj.tagId);
if (targetObject) {
// 找到匹配的对象
targetObject.actionName = newVal; // 设置新的id值
this.dynamicTagObj.actionName = newVal
console.log(this.dynamicTags)
} else {
// 未找到匹配的对象
console.log("未找到匹配的对象");
}
}
// 可以在这里执行自定义逻辑
},
actionType (newVal, oldVal) {
// 可以在这里执行自定义逻辑
}
},
computed: {},
methods: {
handleChange (val) {
console.log(val)
this.actionType == val
let _this = this
// 在输入值发生变化时触发
if (val) {
const targetObject = this.dynamicTags.find(obj => obj.tagId === this.dynamicTagObj.tagId);
if (targetObject) {
// 找到匹配的对象
targetObject.actionType = val; // 设置新的id值
_this.dynamicTagObj.actionType = val
} else {
// 未找到匹配的对象
console.log("未找到匹配的对象");
}
}
},
// 树结构添加数据
addDataToParent (tree, parentKvid, newData) {
let _this = this
_this.childrenTree = []
// 递归函数,用于在树的每一级中查找合适的父节点并添加数据
function addToNode (node, parentKvid, newData) {
if (node.children == undefined) {
node.children = []
}
// 如果当前节点的 kvid 等于 parentKvid,将 newData 添加到当前节点的 children 中
if (node.Kvid === parentKvid) {
node.children.push(newData);
console.log(node)
_this.ischTree = true
for (let i = 0; i < node.children.length; i++) {
_this.childrenTree.push(node.children[i])
}
return true; // 表示数据已添加成功
}
// 递归查找子节点
for (var i = 0; i < node.children.length; i++) {
if (addToNode(node.children[i], parentKvid, newData)) {
return true; // 如果子节点中添加成功,返回 true
}
}
return false; // 表示未找到合适的父节点
}
// 遍历初始树结构,尝试添加数据
for (var i = 0; i < tree.length; i++) {
if (addToNode(tree[i], parentKvid, newData)) {
return; // 如果在当前节点中添加成功,结束函数
}
}
// 如果在整个树中都未找到合适的父节点,可以选择不添加数据或抛出错误
// console.error('Parent node not found for kvid: ' + parentKvid);
tree.push(newData);
},
// 返回上一级目录
goback () {
this.parentKvid = null
let parentKvid = null
for (let i = 0; i < this.childrenTree.length; i++) {
this.childrenTree[i].actionType == 'actions'
parentKvid = this.childrenTree[i].parentKvid
}
console.log(parentKvid)
// bug
let ab = this.findHierarchyByParentKvid(this.allArray, parentKvid);
console.log(ab)
if (ab.length == 0) return
if (ab[0].parentKvid == undefined || ab[0].parentKvid == null) {
this.childrenTree = this.allArray
} else {
this.childrenTree = ab
}
// ab.children = []
},
// 根据parentKvid找当前节点
findHierarchyByParentKvid (tree, parentKvid) {
let _this = this
for (var i = 0; i < tree.length; i++) {
var node = tree[i];
if (node.Kvid === parentKvid) {
return [node]; // 找到匹配的节点,返回包含该节点的数组
}
if (node.children && node.children.length > 0) {
var result = _this.findHierarchyByParentKvid(node.children, parentKvid);
if (result.length > 0) {
return node.children; // 将当前节点与子级层级连接起来
}
}
}
return []; // 未找到匹配的节点,返回空数组
},
// 根据Kvid找节点
findObjectByKvid (array, kvid) {
let _this = this
for (var i = 0; i < array.length; i++) {
var obj = array[i];
if (obj.Kvid === kvid) {
return obj; // 如果当前对象的 kvid 等于目标 kvid,返回当前对象
}
if (obj.children && obj.children.length > 0) {
var result = _this.findObjectByKvid(obj.children, kvid); // 递归查找子级数组中的对象
if (result) {
return result; // 如果在子级数组中找到了目标对象,返回结果
}
}
}
return null; // 如果没有找到目标对象,返回 null
},
// 进入容器
toActions () {
if (this.actionType == 'actions') {
this.parentKvid = this.Kvid
this.selectr = this.dynamicTagObj
console.log('abc')
console.log(this.Kvid)
console.log(this.allArray)
let ab = this.findObjectByKvid(this.allArray, this.Kvid);
console.log(ab)
ab.children = []
console.log(this.allArray)
} else {
this.parentKvid = null
}
},
// 新建动作
newAction () {
this.inputVisible = true;
this.dynamicTagObj = {}
this.actionName = "新建动作"
this.actionType = ""
this.tableDataID = 0
this.kvid = null
let obj = {}
obj.taskName = this.taskName
obj.taskAddress = this.taskAddress
this.dynamicTagObj.actionName = '新建动作'
this.dynamicTagObj.actionType = this.actionType
this.dynamicTagObj.tagId = this.tagId++
this.Kvid = Math.floor(Math.random() * 100001);
this.dynamicTagObj.Kvid = this.Kvid
if (this.parentKvid != null) {
this.dynamicTagObj.parentKvid = this.parentKvid
}
obj.dynamicTags = []
obj.dynamicTags.push(this.dynamicTagObj)
this.dynamicTags.push(this.dynamicTagObj)
this.addDataToParent(this.allArray, this.parentKvid, this.dynamicTagObj)
console.log(this.allArray)
},
// 单击标签
selectTag (item) {
this.parentTree = item
console.log(item.children)
if (item.children != undefined && item.children.length > 0) {
this.childrenTree = []
for (let i = 0; i < item.children.length; i++) {
this.childrenTree.push(item.children[i])
}
this.ischTree = true
}
console.log(item)
this.dynamicTagObj = item
this.actionName = item.actionName
this.actionType = item.actionType
this.inputVisible = true
},
// 删除标签
handleClose (tag) {
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
this.inputVisible = false
},
getTableData () {
const $table = this.$refs.xTable
const removeRecords = $table.getRemoveRecords()
},
async deleteRowEvent (row) {
console.log(row)
this.tableData = this.tableData.filter(item => item.tableDataID !== row.tableDataID)
},
//开始拖拽事件
onStart () {
this.drag = true;
},
//拖拽结束事件
onEnd () {
this.drag = false;
console.log(this.dynamicTags)
},
// 创建动作
submitForm (formName) {
console.log(this.actionName)
// let obj = {}
// let dynamicTag = {}
// obj.taskName = this.taskName
// obj.taskAddress = this.taskAddress
// dynamicTag.actionName = this.actionName
// dynamicTag.actionType = this.actionType
// dynamicTag.tagId = this.tagId++
// console.log(this.actionType)
// obj.dynamicTags = []
// obj.dynamicTags.push(dynamicTag)
// this.dynamicTags.push(dynamicTag)
// this.allData.push(obj)
console.log(this.allData)
this.inputVisible = true
},
btnRightClick () {
console.log("测试");
},
handleInputConfirm () {
let actionName = this.actionName;
if (actionName) {
this.dynamicTags.push(actionName);
}
this.inputVisible = true;
this.actionName = '';
},
selectElement () {
let _this = this
document.oncontextmenu = () => true;
document.oncontextmenu = function (e) {
e.preventDefault()
console.log(e.target.style)
var targetElement = e.target;
e.target.style.backgroundColor = "red"
console.log('右键点击发生在元素:', targetElement);
console.log(e)
const xpath = _this.getElementXPath(targetElement);
console.log("XPath:", xpath);
const element = _this.getElementByXPath(xpath);
console.log(element)
_this.docClose()
let obj = {}
obj.xpath = xpath;
obj.content = e.target.innerText
obj.tableDataID = _this.tableDataID++;
_this.tableData.push(obj)
if (element) {
// 执行你的操作,例如获取元素的文本内容或属性
console.log("元素文本内容:", element.textContent);
console.log("元素属性值:", element.getAttribute("yourAttribute"));
let obj = {}
obj.xpath = xpath;
obj.content = element.textContent;
// _this.data.push(obj);
// _this.addRow(obj)
} else {
console.log("未找到匹配的元素");
}
}
},
docClose () {
console.log('222')
document.oncontextmenu = () => false;
},
// // 根据xpath获取元素信息
getElementByXPath (xpath) {
const result = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
const element = result.singleNodeValue;
return element;
},
// 获取元素xpath
getElementXPath (element) {
if (element && element.id) {
// 如果元素有ID,则使用ID作为XPath的一部分
return `id("${element.id}")`;
}
if (element === document.body) {
// 如果已经到达根元素(body),停止递归
return element.tagName;
}
let siblings = element.parentNode.children;
let index = 1;
for (let i = 0; i < siblings.length; i++) {
const sibling = siblings[i];
if (sibling === element) {
// 如果是目标元素,递归调用并添加位置信息
return `${this.getElementXPath(element.parentNode)}/${element.tagName}[${index}]`;
}
if (sibling.nodeType === 1 && sibling.tagName === element.tagName) {
// 如果是相同类型的兄弟节点,增加索引
index++;
}
}
},
btnRightClick () {
let _this = this
document.oncontextmenu = function (e) {
e.preventDefault()
// console.log(e)
var targetElement = e.target;
console.log('右键点击发生在元素:', targetElement);
const xpath = _this.getElementXPath(targetElement);
console.log("XPath:", xpath);
const element = _this.getElementByXPath(xpath);
console.log(element)
if (element) {
// 执行你的操作,例如获取元素的文本内容或属性
console.log("元素文本内容:", element.textContent);
console.log("元素属性值:", element.getAttribute("yourAttribute"));
let obj = {}
obj.xpath = xpath;
obj.content = element.textContent;
// _this.data.push(obj);
// _this.addRow(obj)
} else {
console.log("未找到匹配的元素");
}
}
},
},
}
</script>
<style>
/* 拖拽窗口大小 */
.tooldrag {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: #3384FF;
text-align: center;
font-size: 15px;
color: white;
}
.tooltips {
min-width: 500px;
min-height: 444px;
background-color: white;
position: fixed;
z-index: 9999;
right: 30px;
bottom: 30px;
font-size: 13px !important;
font-weight: normal !important;
border: solid #3384FF 3px;
border-radius: 10px;
-webkit-user-select: none;
/* 文字不可被选中 */
}
.el-card__body,
.el-main {
padding: 0px !important;
}
.el-input__icon {
line-height: 0px !important;
}
/* 分割线 */
.el-divider--horizontal {
margin-top: 0px !important;
margin-bottom: 0px !important;
background-color: #409EFF !important;
}
.el-tag .el-tag__close {
color: #ffffff !important;
}
.el-tag {
background-color: #409EFF !important;
color: #ffffff !important;
}
.el-tag+.el-tag {
margin-left: 10px;
}
.button-new-tag {
margin-left: 10px;
height: 32px;
line-height: 30px;
padding-top: 0;
padding-bottom: 0;
}
.input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
.innercontent {
text-align: left;
padding-top: 5px !important;
padding-left: 12px !important;
}
.innercontent a {
display: inline-block;
text-decoration: none;
margin-top: 2px !important;
font-size: 13px;
color: #3384FF !important;
cursor: pointer;
text-decoration: none !important;
}
.innercontent a:hover {
color: #3384FF !important;
}
.innercontent span {
font-size: 20px;
color: #3384FF;
line-height: normal;
padding-left: 5px !important;
}
.tooltips button {
font-size: 13px;
border-radius: 5px;
border: solid 1px #409EFF;
background-color: #409EFF;
color: #ffffff;
width: 100px;
height: 30px;
cursor: pointer;
/* margin-left: 15px !important; */
padding: 0 !important;
}
/* 输入框样式 */
.tooltips input[type=text] {
/* display: block; */
/* margin-top: 3px !important; */
/* padding-left: 5px !important; */
/* margin-bottom: 7px !important; */
font-size: 13px;
/* border-radius: 5px; */
/* border: solid 1px #DCDFE6; */
width: 145px;
height: 20px;
}
.el-input--small .el-input__inner {
width: 140px !important;
}
.el-select .el-input__inner {
width: 110px !important;
}
.tooltips select {
display: block;
margin-top: 7px !important;
padding-left: 5px !important;
margin-bottom: 7px !important;
font-size: 15px;
border-radius: 5px;
border: solid 2px #3384FF;
width: 204px;
height: 30px;
}
.tooltips button:hover {
color: #3384FF;
}
/* 下面用来对冻结表格首行元素和固定表格宽度和高度设定样式 */
.toolkitcontain {
border: 1px solid #cdd !important;
/*width: 280px !important;*/
/* 上面的宽度设定很重要 */
height: 150px;
overflow: auto;
margin-top: 10px !important;
position: relative;
}
.toolkitcontain table {
table-layout: fixed;
border-spacing: 0 !important;
word-break: break-all;
word-wrap: break-word;
text-overflow: ellipsis;
overflow: hidden;
margin-top: 0px !important;
white-space: nowrap;
width: 100%;
}
.toolkitcontain th,
.toolkitcontain td,
.toolkitcontain tr {
border: 1px solid rgb(78, 78, 78) !important;
height: 25px !important;
width: 100px !important;
text-align: center !important;
font-weight: normal !important;
overflow: hidden !important;
font-size: 11px !important;
padding-left: 10px !important;
padding-right: 10px !important;
padding-top: 0px !important;
padding-bottom: 0px !important;
vertical-align: middle !important;
white-space: nowrap;
}
.toolkitcontain th span {
font-size: 15px;
font-weight: bold;
cursor: pointer;
/*position: absolute;*/
/*position: ;*/
margin-right: 10px;
vertical-align: text-bottom !important;
}
.toolkitcontain th div {
display: inline-block !important;
overflow: hidden !important;
max-width: 90% !important;
}
.toolkitcontain .toolkittb2 {
position: sticky;
top: 0px;
margin-bottom: 0px;
background-color: azure;
z-index: 1000;
}
.toolkitcontain .toolkittb4 {
position: absolute;
}
#closeButton {
position: absolute;
bottom: 0;
right: 0;
cursor: pointer;
padding: 5px;
opacity: 0.05;
}
#closeButton:hover {
opacity: 1.0;
}
.el-select-dropdown {
z-index: 99999 !important;
}
.vxe-table--render-default .vxe-body--column:not(.col--ellipsis),
.vxe-table--render-default .vxe-footer--column:not(.col--ellipsis),
.vxe-table--render-default .vxe-header--column:not(.col--ellipsis) {
padding: 2px 0 !important;
}
.item {
padding: 6px;
background-color: #fdfdfd;
border: solid 1px #eee;
margin-bottom: 10px;
cursor: move;
}
/*选中样式*/
.chosen {
border: solid 2px #3089dc !important;
}
</style>
<template>
<!-- <router-view></router-view>
-->
<div id="realcontent">
<div id="EasySpiderResizer" style="width: 10px; height: 10px; position: absolute; left: 0; top: 0; cursor: nw-resize;"> </div>
<div>
<!-- 页头信息 -->
<div class="tooldrag">
<img style="width: 20px;height: 20px;" src="./assets/logo.png">
<span style="padding-left: 3px;">K5 网页自动化工具</span>
</div>
<!-- 任务信息 -->
<div style="display: flex;align-items: center;height: 60px;">
<div style="width: 85%;display: flex;flex-direction: column;text-align: left;">
<div style="width: 100%;height: 25px;display: flex;align-items: center;padding-left: 10px;">
<span style="width: 95px;padding-left: 5px;">任务名称:</span>
<el-input v-model="taskName" placeholder="请输入内容" style="height: 20px;"></el-input>
</div>
<div style="width: 100%;height: 25px;display: flex;align-items: center;padding-left: 10px;">
<span style="width: 95px; padding-left: 5px;">任务地址:</span>
<el-input v-model="taskAddress" placeholder="请输入内容" style="height: 20px;" disabled></el-input>
</div>
</div>
<div style="display: flex;flex-direction: column;">
<el-button size="mini" style="width: 60px;height: 25px;margin-bottom: 5px;margin-left: 10px;" @click="submitForm">保存任务</el-button>
<el-button size="mini" style="width: 60px;height: 25px;" @click="newAction">新建动作</el-button>
</div>
</div>
<el-divider></el-divider>
<!-- 动作集合 -->
<div>
<div style="height: 35px;display: flex;justify-content: flex-start;align-items: center;margin-left: 15px;">
<span>动作集合:</span>
<span style="margin-left: 10px;" @click="onBreadcrumb(item)" v-for="item in actionAll" :key="item.kvid">
<span id="Breadcrumb" style="color: blue;">{{ item.name }}</span> /
</span>
</div>
</div>
<!-- 动作标签 -->
<div style="margin-bottom: 5px;margin-left: 15px;margin-right: 15px;width: 470px;overflow: auto;white-space: nowrap;display: flex;">
<!-- <el-button @click="goback">返回</el-button> -->
<draggable v-model="dynamicTags" chosenClass="chosen" forceFallback="true" group="people" animation="1000" @start="onStart" @end="onEnd">
<transition-group>
<!-- <div class="item" v-for="element in myArray" :key="element.id">{{ element.name }}</div> -->
<el-tag class="boxtags" :key="tag.Kvid" v-for="(tag, index) in allArray" @click="selectTag(tag)" v-if="ischTree == false && childrenTree.length >= 0">
<div style="display: flex;align-items: center;">
<span style="margin-left: 3px;">{{ tag.actionName }}</span>
<img id="closeimg" @click="handleClose(index)" style="width: 15px;" src="./assets/close.png">
</div>
</el-tag>
<el-tag class="boxtags" v-if="childrenTree.length > 0 || ischTree == true" :key="item.Kvid" v-for="(item, index) in childrenTree" @click="selectTag(item)">
<div style="display: flex;align-items: center;">
<span style="margin-left: 3px;">{{ item.actionName }}</span>
<img id="closeimg" @click="handleClose(index)" style="width: 15px;" src="./assets/close.png">
</div>
</el-tag>
<!-- <el-tag class="boxtags" :key="index" v-for="(item, index) in dynamicTags" closable :disable-transitions="false" @close="handleClose(index)">
{{ item.actionName }}
</el-tag> -->
</transition-group>
</draggable>
</div>
<el-divider></el-divider>
<!-- 动作配置 -->
<el-card class="box-card" v-if="inputVisible">
<div style="height: 35px;display: flex;justify-content: space-evenly;align-items: center;">
<span>动作配置:</span>
<div style="width: 211px;display: flex;align-items: center;">
<span style="width: 90px;">动作名称:</span>
<!-- ref="saveTagInput" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" -->
<el-input class="input-new-tag dongzuo" v-model="actionName" size="small" placeholder="请输入动作名称">
</el-input>
</div>
<div style="margin-right: 5px;">
<span style="width: 90px;">动作类型:</span>
<el-select id="eventType" name="eventType" v-model="actionType" placeholder="请选择类型" @change="handleChange" filterable remote>
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
<div v-if="actionType == 'actions'">
<el-button @click="toActions">进入容器</el-button>
</div>
</div>
<!-- 选择动作 -->
<div style="background-color: white;" v-if="actionType == 'select'">
<div style="height: 35px;margin-left: 15px;text-align: left;">
<el-button size="small" style="" class="button-new-tag" @click="selectElement">选择元素</el-button>
<span style="margin-left: 3px;">元素信息如下:</span>
</div>
<!-- 表格信息 -->
<vxe-table :data="tableData" ref="xTable" border class="mytable-scrollbar" height="220">
<vxe-column field="xpath" title="xpath"></vxe-column>
<vxe-column field="content" title="content"></vxe-column>
<vxe-column title="操作" width="100">
<template #default="{ row }">
<vxe-button status="danger" content="删除" @click="deleteRowEvent(row)" style="margin-right: 20px;width: 50px;"></vxe-button>
</template>
</vxe-column>
</vxe-table>
</div>
<!-- 点击动作 -->
<div v-if="actionType == 'elClick'">
<div style="margin-left: 15px;">
<el-button size="small" class="button-new-tag">选择点击元素</el-button>
</div>
</div>
<!-- 等待动作 -->
<div v-if="actionType == 'wait'" style="display: flex;justify-content: center;margin-top: 10px;">
<div style="display: flex;align-items: center;">
<span style="width: 130px;">输入等待时间:</span>
<!-- ref="saveTagInput" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" -->
<el-input class="input-new-tag dongzuo" size="small" placeholder="输入等待时间">
<template slot="suffix">单位:s</template>
</el-input>
</div>
</div>
<!-- 输入动作 -->
<div v-if="actionType == 'input'">
<div style="margin-left: 15px;">
<el-button size="small" class="button-new-tag">选择输入框</el-button>
<div style="display: flex;justify-content: center;">
<div style="display: flex;align-items: center;margin-top: 10px;">
<span style="width: 80px;">输入内容:</span>
<!-- ref="saveTagInput" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" -->
<el-input class="input-new-tag dongzuo" size="small" placeholder="输入内容">
</el-input>
</div>
</div>
</div>
</div>
<!-- 循环点击 -->
<div v-if="actionType == 'loopClick'">
<div style="margin-left: 15px;">
<el-button size="small" class="button-new-tag" style="width: 120px;">点击创建循环容器</el-button>
</div>
</div>
<!-- 采集单元素 -->
<div style="background-color: white;" v-if="actionType == 'collectSingleElements'">
<div style="height: 35px;margin-left: 15px;text-align: left;">
<el-button size="small" class="button-new-tag" @click="selectElement">选择元素</el-button>
<span style="margin-left: 3px;">元素信息如下:</span>
</div>
<!-- 表格信息 -->
<vxe-table :data="tableData" ref="xTable" border class="mytable-scrollbar" height="220">
<vxe-column field="name" title="xpath"></vxe-column>
<vxe-column field="sex" title="content"></vxe-column>
<vxe-column title="操作" width="100">
<template #default="{ row }">
<vxe-button status="danger" content="删除" @click="deleteRowEvent(row)" style="margin-right: 20px;width: 50px;"></vxe-button>
</template>
</vxe-column>
</vxe-table>
</div>
<!-- 关闭页面 -->
<div v-if="actionType == 'pageClose'">
<div style="margin-left: 15px;">
<el-button size="small" class="button-new-tag">点击关闭页面</el-button>
</div>
</div>
<!-- 提交动作 -->
<div v-if="actionType == 'submit'">
<el-empty description="提交动作暂无"></el-empty>
</div>
<!-- 鼠标移动 -->
<div v-if="actionType == 'mouseMove'">
<el-empty description="鼠标移动暂无"></el-empty>
</div>
<!-- 脚本执行 -->
<div v-if="actionType == 'pageJavascipt'">
<el-empty description="脚本执行暂无"></el-empty>
</div>
<!-- 采集表 -->
<div v-if="actionType == 'collectionTable'">
<el-empty description="采集表暂无"></el-empty>
</div>
</el-card>
</div>
</div>
</template>
<script>
import VXETable, { t } from 'vxe-table'
import draggable from 'vuedraggable'
export default {
name: 'App',
components: { draggable },
props: {},
data() {
return {
taskName: '',
taskAddress: 'https://k5.kivii.org/storages/app/files/bundle.js',
actionName: '',
actionType: '',
dynamicTags: [],
inputVisible: false,
options: [{
value: 'select',
label: '选择'
}, {
value: 'elClick',
label: '点击'
}, {
value: 'wait',
label: '等待'
}, {
value: 'input',
label: '输入'
}, {
value: 'loopClick',
label: '循环点击'
}, {
value: 'collectSingleElements',
label: '采集单元素'
}, {
value: 'pageClose',
label: '关闭页面'
}, {
value: 'mouseMove',
label: '鼠标移动'
}, {
value: 'pageJavascipt',
label: '脚本执行'
}, {
value: 'collectionTable',
label: '采集表'
}, {
value: 'submit',
label: '提交'
}, {
value: 'actions',
label: '容器'
}],
tableData: [],
drag: false,
allData: [],
tagId: 0,
dynamicTagObj: {},
tableDataID: 0,
parentTree: [],
childrenTree: [],
kvid: null,
parentKvid: null,
ischTree: false,
allArray: [
],
selectr: {},
actionAll: []
}
},
created() { },
mounted() {
this.$nextTick(() => {
window.addEventListener('resize', this.onResize);
});
this.$watch('dynamicTagObj.actionName', (newVal, oldVal) => {
this.dynamicTagObj.actionName = newVal
});
},
watch: {
actionName(newVal, oldVal) {
// 在输入值发生变化时触发
if (newVal !== oldVal) {
console.log(newVal)
console.log(this.dynamicTags)
const targetObject = this.dynamicTags.find(obj => obj.tagId === this.dynamicTagObj.tagId);
if (targetObject) {
// 找到匹配的对象
targetObject.actionName = newVal; // 设置新的id值
this.dynamicTagObj.actionName = newVal
console.log(this.dynamicTags)
} else {
// 未找到匹配的对象
console.log("未找到匹配的对象");
}
}
// 可以在这里执行自定义逻辑
},
actionType(newVal, oldVal) {
// 可以在这里执行自定义逻辑
}
},
computed: {},
methods: {
handleChange(val) {
this.actionType == val
let _this = this
// 在输入值发生变化时触发
if (val) {
const targetObject = this.dynamicTags.find(obj => obj.tagId === this.dynamicTagObj.tagId);
if (targetObject) {
// 找到匹配的对象
targetObject.actionType = val; // 设置新的id值
_this.dynamicTagObj.actionType = val
} else {
// 未找到匹配的对象
console.log("未找到匹配的对象");
}
}
},
// 根据 Kvid 找到对应的对象,并将匹配到的对象后面的所有对象数据删除
deleteObjectsAfterKvid(dataArray, targetKvid) {
const index = dataArray.findIndex(obj => obj.Kvid === targetKvid);
if (index !== -1) {
// 找到匹配的对象
dataArray.splice(index + 1);
} else {
console.log("未找到匹配的对象");
}
},
// 树结构添加数据
addDataToParent(tree, parentKvid, newData) {
let _this = this
_this.childrenTree = []
// 递归函数,用于在树的每一级中查找合适的父节点并添加数据
function addToNode(node, parentKvid, newData) {
if (node.children == undefined) {
node.children = []
}
// 如果当前节点的 kvid 等于 parentKvid,将 newData 添加到当前节点的 children 中
if (node.Kvid === parentKvid) {
node.children.push(newData);
_this.ischTree = true
for (let i = 0; i < node.children.length; i++) {
_this.childrenTree.push(node.children[i])
}
return true; // 表示数据已添加成功
}
// 递归查找子节点
for (var i = 0; i < node.children.length; i++) {
if (addToNode(node.children[i], parentKvid, newData)) {
return true; // 如果子节点中添加成功,返回 true
}
}
return false; // 表示未找到合适的父节点
}
// 遍历初始树结构,尝试添加数据
for (var i = 0; i < tree.length; i++) {
if (addToNode(tree[i], parentKvid, newData)) {
return; // 如果在当前节点中添加成功,结束函数
}
}
// 如果在整个树中都未找到合适的父节点,可以选择不添加数据或抛出错误
// console.error('Parent node not found for kvid: ' + parentKvid);
tree.push(newData);
},
// 返回上一级目录
goback() {
this.parentKvid = null
this.childrenTree = []
let activeItem = this.findObjectByKvid(this.allArray, this.Kvid);
let activeParentItem = this.findObjectByKvid(this.allArray, activeItem.parentKvid);
let activeParentsItem = this.findObjectByKvid(this.allArray, activeParentItem.parentKvid);
if (activeParentsItem == null) {
this.childrenTree = this.allArray
} else {
for (let i = 0; i < activeParentsItem.children.length; i++) {
this.childrenTree.push(activeParentsItem.children[i])
// }
}
this.Kvid = activeParentItem.Kvid
}
},
// 根据parentKvid找当前节点
findHierarchyByParentKvid(tree, parentKvid) {
let _this = this
for (var i = 0; i < tree.length; i++) {
var node = tree[i];
if (node.Kvid === parentKvid) {
return [node]; // 找到匹配的节点,返回包含该节点的数组
}
if (node.children && node.children.length > 0) {
var result = _this.findHierarchyByParentKvid(node.children, parentKvid);
if (result.length > 0) {
return node.children; // 将当前节点与子级层级连接起来
}
}
}
return []; // 未找到匹配的节点,返回空数组
},
// 根据Kvid找节点
findObjectByKvid(array, kvid) {
let _this = this
for (var i = 0; i < array.length; i++) {
var obj = array[i];
if (obj.Kvid === kvid) {
return obj; // 如果当前对象的 kvid 等于目标 kvid,返回当前对象
}
if (obj.children && obj.children.length > 0) {
var result = _this.findObjectByKvid(obj.children, kvid); // 递归查找子级数组中的对象
if (result) {
return result; // 如果在子级数组中找到了目标对象,返回结果
}
}
}
return null; // 如果没有找到目标对象,返回 null
},
// 进入容器
toActions() {
if (this.actionType == 'actions') {
this.parentKvid = this.Kvid
this.selectr = this.dynamicTagObj
let activeItem = this.findObjectByKvid(this.allArray, this.Kvid);
let activeParentItem = this.findObjectByKvid(this.allArray, activeItem.parentKvid);
activeItem.children = []
if (activeParentItem == null) {
let obj = {}
obj.name = '根'
obj.Kvid = 123
obj.children = []
for (let i = 0; i < this.allArray.length; i++) {
obj.children.push(this.allArray[i])
}
// this.actionAll.push(obj)
this.findOrPushObject(this.actionAll, obj)
} else {
let obj = {}
obj.name = activeParentItem.actionName
obj.Kvid = activeParentItem.Kvid
obj.children = []
for (let i = 0; i < activeParentItem.children.length; i++) {
obj.children.push(activeParentItem.children[i])
}
// this.actionAll.push(obj)
this.findOrPushObject(this.actionAll, obj)
}
} else {
this.parentKvid = null
}
},
// 新建动作
newAction() {
this.inputVisible = true;
this.dynamicTagObj = {}
this.actionName = "新建动作"
this.actionType = ""
this.tableDataID = 0
this.kvid = null
let obj = {}
obj.taskName = this.taskName
obj.taskAddress = this.taskAddress
this.dynamicTagObj.actionName = '新建动作'
this.dynamicTagObj.actionType = this.actionType
this.dynamicTagObj.tagId = this.tagId++
this.Kvid = Math.floor(Math.random() * 100001);
this.dynamicTagObj.Kvid = this.Kvid
if (this.parentKvid != null) {
this.dynamicTagObj.parentKvid = this.parentKvid
}
obj.dynamicTags = []
obj.dynamicTags.push(this.dynamicTagObj)
this.dynamicTags.push(this.dynamicTagObj)
this.addDataToParent(this.allArray, this.parentKvid, this.dynamicTagObj)
console.log(this.allArray)
},
// 根据 Kvid 匹配,如果有相同的就返回,没有就 push
findOrPushObject(dataArray, newObj) {
const existingObj = dataArray.find(obj => obj.Kvid === newObj.Kvid);
if (existingObj) {
// 已经存在相同的 Kvid,返回该对象
return existingObj;
} else {
// 不存在相同的 Kvid,将新对象推送到数组
this.actionAll.push(newObj);
return newObj;
}
},
// 单击标签
selectTag(item) {
this.parentTree = item
if (item.actionType == 'actions') {
let obj = {}
obj.name = item.actionName
obj.Kvid = item.Kvid
obj.children = []
for (let i = 0; i < item.children.length; i++) {
obj.children.push(item.children[i])
}
this.findOrPushObject(this.actionAll, obj)
}
this.Kvid = item.Kvid
if (item.children != undefined && item.children.length > 0) {
this.childrenTree = []
for (let i = 0; i < item.children.length; i++) {
this.childrenTree.push(item.children[i])
}
this.ischTree = true
}
this.dynamicTagObj = item
this.actionName = item.actionName
this.actionType = item.actionType
this.inputVisible = true
},
// 导航标签
onBreadcrumb(item) {
this.deleteObjectsAfterKvid(this.actionAll, item.Kvid)
this.childrenTree = []
this.childrenTree = item.children
},
// 删除标签
handleClose(tag) {
console.log(tag)
if (this.childrenTree.length > 0) {
this.childrenTree.splice(this.childrenTree.indexOf(tag), 1);
} else {
this.allArray.splice(this.allArray.indexOf(tag), 1);
}
this.inputVisible = false
},
getTableData() {
const $table = this.$refs.xTable
const removeRecords = $table.getRemoveRecords()
},
async deleteRowEvent(row) {
this.tableData = this.tableData.filter(item => item.tableDataID !== row.tableDataID)
},
//开始拖拽事件
onStart() {
this.drag = true;
},
//拖拽结束事件
onEnd() {
this.drag = false;
},
// 创建动作
submitForm(formName) {
this.inputVisible = true
},
btnRightClick() {
console.log("测试");
},
handleInputConfirm() {
let actionName = this.actionName;
if (actionName) {
this.dynamicTags.push(actionName);
}
this.inputVisible = true;
this.actionName = '';
},
selectElement() {
let _this = this
document.oncontextmenu = () => true;
document.oncontextmenu = function (e) {
e.preventDefault()
console.log(e.target.style)
var targetElement = e.target;
e.target.style.backgroundColor = "red"
console.log('右键点击发生在元素:', targetElement);
console.log(e)
const xpath = _this.getElementXPath(targetElement);
console.log("XPath:", xpath);
const element = _this.getElementByXPath(xpath);
console.log(element)
_this.docClose()
let obj = {}
obj.xpath = xpath;
obj.content = e.target.innerText
obj.tableDataID = _this.tableDataID++;
_this.tableData.push(obj)
if (element) {
// 执行你的操作,例如获取元素的文本内容或属性
console.log("元素文本内容:", element.textContent);
console.log("元素属性值:", element.getAttribute("yourAttribute"));
let obj = {}
obj.xpath = xpath;
obj.content = element.textContent;
// _this.data.push(obj);
// _this.addRow(obj)
} else {
console.log("未找到匹配的元素");
}
}
},
docClose() {
document.oncontextmenu = () => false;
},
// // 根据xpath获取元素信息
getElementByXPath(xpath) {
const result = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
const element = result.singleNodeValue;
return element;
},
// 获取元素xpath
getElementXPath(element) {
if (element && element.id) {
// 如果元素有ID,则使用ID作为XPath的一部分
return `id("${element.id}")`;
}
if (element === document.body) {
// 如果已经到达根元素(body),停止递归
return element.tagName;
}
let siblings = element.parentNode.children;
let index = 1;
for (let i = 0; i < siblings.length; i++) {
const sibling = siblings[i];
if (sibling === element) {
// 如果是目标元素,递归调用并添加位置信息
return `${this.getElementXPath(element.parentNode)}/${element.tagName}[${index}]`;
}
if (sibling.nodeType === 1 && sibling.tagName === element.tagName) {
// 如果是相同类型的兄弟节点,增加索引
index++;
}
}
},
btnRightClick() {
let _this = this
document.oncontextmenu = function (e) {
e.preventDefault()
// console.log(e)
var targetElement = e.target;
console.log('右键点击发生在元素:', targetElement);
const xpath = _this.getElementXPath(targetElement);
console.log("XPath:", xpath);
const element = _this.getElementByXPath(xpath);
console.log(element)
if (element) {
// 执行你的操作,例如获取元素的文本内容或属性
console.log("元素文本内容:", element.textContent);
console.log("元素属性值:", element.getAttribute("yourAttribute"));
let obj = {}
obj.xpath = xpath;
obj.content = element.textContent;
// _this.data.push(obj);
// _this.addRow(obj)
} else {
console.log("未找到匹配的元素");
}
}
},
},
}
</script>
<style>
/* 删除时鼠标手势 */
#closeimg {
cursor: pointer;
}
#Breadcrumb {
cursor: pointer;
}
/* 拖拽窗口大小 */
.tooldrag {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: #3384FF;
text-align: center;
font-size: 15px;
color: white;
}
.tooltips {
min-width: 500px;
min-height: 444px;
background-color: white;
position: fixed;
z-index: 9999;
right: 30px;
bottom: 30px;
font-size: 13px !important;
font-weight: normal !important;
border: solid #3384FF 3px;
border-radius: 10px;
-webkit-user-select: none;
/* 文字不可被选中 */
}
.el-card__body,
.el-main {
padding: 0px !important;
}
.el-input__icon {
line-height: 0px !important;
}
/* 分割线 */
.el-divider--horizontal {
margin-top: 0px !important;
margin-bottom: 0px !important;
background-color: #409EFF !important;
}
.el-tag .el-tag__close {
color: #ffffff !important;
}
.el-tag {
background-color: #409EFF !important;
color: #ffffff !important;
}
.el-tag+.el-tag {
margin-left: 10px;
}
.button-new-tag {
margin-left: 10px;
height: 32px;
line-height: 30px;
padding-top: 0;
padding-bottom: 0;
}
.input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
.innercontent {
text-align: left;
padding-top: 5px !important;
padding-left: 12px !important;
}
.innercontent a {
display: inline-block;
text-decoration: none;
margin-top: 2px !important;
font-size: 13px;
color: #3384FF !important;
cursor: pointer;
text-decoration: none !important;
}
.innercontent a:hover {
color: #3384FF !important;
}
.innercontent span {
font-size: 20px;
color: #3384FF;
line-height: normal;
padding-left: 5px !important;
}
.tooltips button {
font-size: 13px;
border-radius: 5px;
border: solid 1px #409EFF;
background-color: #409EFF;
color: #ffffff;
width: 100px;
height: 30px;
cursor: pointer;
/* margin-left: 15px !important; */
padding: 0 !important;
}
/* 输入框样式 */
.tooltips input[type=text] {
/* display: block; */
/* margin-top: 3px !important; */
/* padding-left: 5px !important; */
/* margin-bottom: 7px !important; */
font-size: 13px;
/* border-radius: 5px; */
/* border: solid 1px #DCDFE6; */
width: 145px;
height: 20px;
}
.el-input--small .el-input__inner {
width: 140px !important;
}
.el-select .el-input__inner {
width: 110px !important;
}
.tooltips select {
display: block;
margin-top: 7px !important;
padding-left: 5px !important;
margin-bottom: 7px !important;
font-size: 15px;
border-radius: 5px;
border: solid 2px #3384FF;
width: 204px;
height: 30px;
}
.tooltips button:hover {
color: #3384FF;
}
/* 下面用来对冻结表格首行元素和固定表格宽度和高度设定样式 */
.toolkitcontain {
border: 1px solid #cdd !important;
/*width: 280px !important;*/
/* 上面的宽度设定很重要 */
height: 150px;
overflow: auto;
margin-top: 10px !important;
position: relative;
}
.toolkitcontain table {
table-layout: fixed;
border-spacing: 0 !important;
word-break: break-all;
word-wrap: break-word;
text-overflow: ellipsis;
overflow: hidden;
margin-top: 0px !important;
white-space: nowrap;
width: 100%;
}
.toolkitcontain th,
.toolkitcontain td,
.toolkitcontain tr {
border: 1px solid rgb(78, 78, 78) !important;
height: 25px !important;
width: 100px !important;
text-align: center !important;
font-weight: normal !important;
overflow: hidden !important;
font-size: 11px !important;
padding-left: 10px !important;
padding-right: 10px !important;
padding-top: 0px !important;
padding-bottom: 0px !important;
vertical-align: middle !important;
white-space: nowrap;
}
.toolkitcontain th span {
font-size: 15px;
font-weight: bold;
cursor: pointer;
/*position: absolute;*/
/*position: ;*/
margin-right: 10px;
vertical-align: text-bottom !important;
}
.toolkitcontain th div {
display: inline-block !important;
overflow: hidden !important;
max-width: 90% !important;
}
.toolkitcontain .toolkittb2 {
position: sticky;
top: 0px;
margin-bottom: 0px;
background-color: azure;
z-index: 1000;
}
.toolkitcontain .toolkittb4 {
position: absolute;
}
#closeButton {
position: absolute;
bottom: 0;
right: 0;
cursor: pointer;
padding: 5px;
opacity: 0.05;
}
#closeButton:hover {
opacity: 1.0;
}
.el-select-dropdown {
z-index: 99999 !important;
}
.vxe-table--render-default .vxe-body--column:not(.col--ellipsis),
.vxe-table--render-default .vxe-footer--column:not(.col--ellipsis),
.vxe-table--render-default .vxe-header--column:not(.col--ellipsis) {
padding: 2px 0 !important;
}
.item {
padding: 6px;
background-color: #fdfdfd;
border: solid 1px #eee;
margin-bottom: 10px;
cursor: move;
}
/*选中样式*/
.chosen {
border: solid 2px #3089dc !important;
}
</style>
......@@ -20,7 +20,7 @@ let timer;
function generateToolkit () {
// global.app = new Vue(ToolKit);
let h = $(".tooldrag").height();
console.log(h)
// console.log(h)
let difference = 26 - h; //获得高度值差
if (difference > 0) {
$(".tooldrag").css("cssText", "height:" + (26 + difference) + "px!important")
......@@ -60,7 +60,7 @@ function generateToolkit () {
// 拖拽右下角改变大小
const wrapperToolkit = document.getElementById('wrapperToolkit');
const EasySpiderResizer = document.getElementById('EasySpiderResizer');
console.log(EasySpiderResizer)
// console.log(EasySpiderResizer)
let mousedown = false;
let startX, startY, startWidth, startHeight;
......
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