提交 c79ada80 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

update script page

上级 c4f5eb5d
...@@ -9,5 +9,5 @@ VUE_APP_MOCK = true ...@@ -9,5 +9,5 @@ VUE_APP_MOCK = true
#api接口域名 #api接口域名
VUE_APP_APIHOST_MOCK = /api VUE_APP_APIHOST_MOCK = /api
# VUE_APP_APIHOST = http://127.0.0.1:8085/api/v1 VUE_APP_APIHOST = http://127.0.0.1:8085/api/v1
VUE_APP_APIHOST = http://192.168.0.112:8085/api/v1 # VUE_APP_APIHOST = http://192.168.0.112:8085/api/v1
\ No newline at end of file \ No newline at end of file
...@@ -106,11 +106,13 @@ body { ...@@ -106,11 +106,13 @@ body {
} }
/* 滚动条 */ /* 滚动条 */
@outWidth: 4px;
@innerWidth: 3px;
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 5px; width: @outWidth;
height: 5px; height: @outWidth;
background: transparent; background: transparent;
border-radius: 5px; border-radius: @outWidth;
} }
/* 滚动条两端按钮 */ /* 滚动条两端按钮 */
...@@ -121,29 +123,29 @@ body { ...@@ -121,29 +123,29 @@ body {
/* 外层轨道 */ /* 外层轨道 */
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
border-radius: 5px; border-radius: @outWidth;
} }
/* 内层轨道,它会覆盖外层轨道的样式 */ /* 内层轨道,它会覆盖外层轨道的样式 */
::-webkit-scrollbar-track-piece { ::-webkit-scrollbar-track-piece {
width: 4px; width: @innerWidth;
margin: 0 -2px 0; margin: 0 -2px 0;
} }
/* 滑块 */ /* 滑块 */
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background-color: #ccc; background-color: #ECF0F1;
min-height: 60px; min-height: 60px;
min-width: 60px; min-width: 60px;
border-radius: 5px; border-radius: @outWidth;
} }
/* 纵向滑块悬浮 */ /* 纵向滑块悬浮 */
::-webkit-scrollbar-thumb:vertical:hover { ::-webkit-scrollbar-thumb:vertical:hover {
background-color: #333; background-color: #BDC3C7;
} }
/* 横向滑块悬浮 */ /* 横向滑块悬浮 */
::-webkit-scrollbar-thumb:horizontal:hover { ::-webkit-scrollbar-thumb:horizontal:hover {
background-color: #333; background-color: #BDC3C7;
} }
\ No newline at end of file
// 主窗口背景色 // 主窗口背景色
@mainBgColor: #f0f3f4; @mainBgColor: #fff;
// 左边宽度 // 左边宽度
@leftSideBarWidth: 200px; @leftSideBarWidth: 200px;
// 头部高度 // 头部高度
......
<template> <template>
<div id="indexlayout"> <div id="indexlayout">
<div <div id="indexlayout-right">
id="indexlayout-right"
:class="{'fiexd-header': headFixed}"
>
<Top <Top
:collapsed="collapsed" :collapsed="collapsed"
:topNavEnable="topNavEnable" :topNavEnable="topNavEnable"
...@@ -41,7 +38,6 @@ interface IndexLayoutSetupData { ...@@ -41,7 +38,6 @@ interface IndexLayoutSetupData {
toggleCollapsed: () => void; toggleCollapsed: () => void;
topNavEnable: ComputedRef<boolean>; topNavEnable: ComputedRef<boolean>;
belongTopMenu: ComputedRef<string>; belongTopMenu: ComputedRef<string>;
headFixed: ComputedRef<boolean>;
selectedKeys: ComputedRef<string[]>; selectedKeys: ComputedRef<string[]>;
leftOpenKeys: Ref<string[]>; leftOpenKeys: Ref<string[]>;
breadCrumbs: ComputedRef<BreadcrumbType[]>; breadCrumbs: ComputedRef<BreadcrumbType[]>;
...@@ -85,9 +81,6 @@ export default defineComponent({ ...@@ -85,9 +81,6 @@ export default defineComponent({
// 右侧顶部导航是否开启 // 右侧顶部导航是否开启
const topNavEnable = computed<boolean>(()=> store.state.global.topNavEnable); const topNavEnable = computed<boolean>(()=> store.state.global.topNavEnable);
// 右侧顶部是否固定
const headFixed = computed<boolean>(()=> store.state.global.headFixed);
// 左侧选择菜单key // 左侧选择菜单key
const selectedKeys = computed<string[]>(()=>{ const selectedKeys = computed<string[]>(()=>{
const selectedKey = getSelectLeftMenuPath(routeItem.value); const selectedKey = getSelectLeftMenuPath(routeItem.value);
...@@ -124,7 +117,6 @@ export default defineComponent({ ...@@ -124,7 +117,6 @@ export default defineComponent({
toggleCollapsed, toggleCollapsed,
topNavEnable, topNavEnable,
belongTopMenu, belongTopMenu,
headFixed,
selectedKeys, selectedKeys,
leftOpenKeys, leftOpenKeys,
breadCrumbs, breadCrumbs,
...@@ -147,13 +139,13 @@ export default defineComponent({ ...@@ -147,13 +139,13 @@ export default defineComponent({
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
background-color: @mainBgColor; background-color: @mainBgColor;
&.fiexd-header {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.indexlayout-right-main { .indexlayout-right-main {
flex: 1; flex: 1;
overflow: auto; overflow: auto;
} background-color: @mainBgColor;
} }
} }
.indexlayout-main-conent { .indexlayout-main-conent {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<a-form-item :wrapper-col="{ span: wrapperCol.span, offset: labelCol.span }"> <a-form-item :wrapper-col="{ span: wrapperCol.span, offset: labelCol.span }">
<a-select v-if="interpreterInfos.length > 0" v-model:value="selectedInterpreter" @change="selectInterpreter"> <a-select v-if="interpreterInfos.length > 0" v-model:value="selectedInterpreter" @change="selectInterpreter">
<a-select-option value="">{{interpreterInfos.length}}项可选择</a-select-option> <a-select-option value="">找到 {{interpreterInfos.length}} 项可选</a-select-option>
<a-select-option v-for="item in interpreterInfos" :key="item.path" :value="item.path"> <a-select-option v-for="item in interpreterInfos" :key="item.path" :value="item.path">
{{ item.info }} {{ item.info }}
</a-select-option> </a-select-option>
......
...@@ -34,16 +34,19 @@ ...@@ -34,16 +34,19 @@
</a-button> </a-button>
</div> </div>
</div> </div>
<div class="tree-panel"> <div class="tree-panel">
<a-tree <a-tree
v-if="!treeDataEmpty" v-if="!treeDataEmpty"
ref="tree"
:tree-data="treeData" :tree-data="treeData"
v-model:expandedKeys="expandedKeys"
v-model:checkedKeys="checkedKeys"
:replace-fields="replaceFields" :replace-fields="replaceFields"
show-icon show-icon
checkable
@expand="expandNode" @expand="expandNode"
@select="selectNode" @select="selectNode"
v-model:expandedKeys="expandedKeys"
> >
<template #icon="slotProps"> <template #icon="slotProps">
<DatabaseOutlined v-if="slotProps.type==='workspace'" /> <DatabaseOutlined v-if="slotProps.type==='workspace'" />
...@@ -56,7 +59,13 @@ ...@@ -56,7 +59,13 @@
<a-empty v-if="treeDataEmpty" :image="simpleImage"/> <a-empty v-if="treeDataEmpty" :image="simpleImage"/>
</div> </div>
<div class="actions">
<a-button @click="checkoutCases">导出禅道用例</a-button>
<a-button :disabled="checkedKeys.length === 0" @click="checkinCases">更新禅道用例</a-button>
<a-button :disabled="checkedKeys.length === 0" @click="execSelected">{{ t('exec') }}</a-button>
</div> </div>
</div>
</template> </template>
<script lang="ts"> <script lang="ts">
...@@ -165,7 +174,6 @@ export default defineComponent({ ...@@ -165,7 +174,6 @@ export default defineComponent({
} }
const expandedKeys = ref<string[]>([]); const expandedKeys = ref<string[]>([]);
const getOpenKeys = (treeNode, isAll) => { const getOpenKeys = (treeNode, isAll) => {
if (!treeNode) return if (!treeNode) return
expandedKeys.value.push(treeNode.path) expandedKeys.value.push(treeNode.path)
...@@ -175,15 +183,14 @@ export default defineComponent({ ...@@ -175,15 +183,14 @@ export default defineComponent({
}) })
} }
} }
expandedKeys.value = []
getOpenKeys(treeData.value[0], false) getOpenKeys(treeData.value[0], false)
const checkedKeys = ref<string[]>([])
const replaceFields = { const replaceFields = {
key: 'path', key: 'path',
}; };
let selectedNode = {} as any
let isExpand = ref(false); let isExpand = ref(false);
let tree = ref(null) let tree = ref(null)
...@@ -192,6 +199,16 @@ export default defineComponent({ ...@@ -192,6 +199,16 @@ export default defineComponent({
console.log('onMounted', tree) console.log('onMounted', tree)
}) })
const execSelected = () => {
console.log('execSelected')
}
const checkoutCases = () => {
console.log('checkoutCases')
}
const checkinCases = () => {
console.log('checkinCases')
}
const selectNode = (selectedKeys, e) => { const selectNode = (selectedKeys, e) => {
console.log('selectNode', e.selectedNodes) console.log('selectNode', e.selectedNodes)
...@@ -234,10 +251,14 @@ export default defineComponent({ ...@@ -234,10 +251,14 @@ export default defineComponent({
replaceFields, replaceFields,
expandNode, expandNode,
selectNode, selectNode,
execSelected,
checkoutCases,
checkinCases,
isExpand, isExpand,
expandAll, expandAll,
tree, tree,
expandedKeys, expandedKeys,
checkedKeys,
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE, simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
} }
} }
...@@ -248,43 +269,55 @@ export default defineComponent({ ...@@ -248,43 +269,55 @@ export default defineComponent({
<style lang="less" scoped> <style lang="less" scoped>
.tree-main { .tree-main {
width: 380px; width: 100%;
height: 100%;
height: 100%; padding: 0;
padding: 3px 0 0 3px; display: flex;
flex-direction: column;
.toolbar {
display: flex;
padding: 4px 3px;
height: 40px;
//border-bottom: 1px solid #D0D7DE;
.left {
flex: 1;
.ant-select-tree-switcher {
display: none;
}
}
.toolbar { .right {
display: flex; width: 40px;
padding: 0 3px; text-align: right;
border-bottom: 1px solid #D0D7DE; }
.left { .ant-btn-link {
flex: 1; padding: 0px 3px;
.ant-select-tree-switcher { color: #1890ff;
display: none; }
} }
}
.right { .tree-panel {
width: 40px; flex: 1;
text-align: right; overflow: auto;
}
.ant-btn-link { .ant-tree {
padding: 0px 3px; font-size: 16px;
color: #1890ff; }
} }
}
.tree-panel { .actions {
height: calc(100% - 35px); padding: 4px;
overflow: auto; height: 40px;
text-align: center;
.ant-tree { .ant-btn {
font-size: 16px; margin: 0 5px;
}
}
} }
}
}
</style> </style>
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
<div id="right"> <div id="right">
<div class="toolbar"> <div class="toolbar">
<template v-if="scriptCode !== ''"> <template v-if="scriptCode !== ''">
<a-button @click="execSingle" type="primary" size="small">{{ t('exec') }}</a-button> <a-button @click="execSingle" type="primary">{{ t('exec') }}</a-button>
<a-button @click="extract" type="primary" size="small">{{ t('extract_step') }}</a-button> <a-button @click="extract">{{ t('extract_step') }}</a-button>
</template> </template>
</div> </div>
...@@ -239,39 +239,7 @@ export default defineComponent({ ...@@ -239,39 +239,7 @@ export default defineComponent({
width: 380px; width: 380px;
height: 100%; height: 100%;
padding: 3px 0 0 3px; padding: 0;
.toolbar {
display: flex;
padding: 0 3px;
border-bottom: 1px solid #D0D7DE;
.left {
flex: 1;
.ant-select-tree-switcher {
display: none;
}
}
.right {
width: 40px;
text-align: right;
}
.ant-btn-link {
padding: 0px 3px;
color: #1890ff;
}
}
.tree-panel {
height: calc(100% - 35px);
overflow: auto;
.ant-tree {
font-size: 16px;
}
}
} }
#splitter-h { #splitter-h {
...@@ -290,8 +258,8 @@ export default defineComponent({ ...@@ -290,8 +258,8 @@ export default defineComponent({
height: 100%; height: 100%;
.toolbar { .toolbar {
padding: 5px 10px; padding: 4px 10px;
height: 36px; height: 40px;
text-align: right; text-align: right;
.ant-btn { .ant-btn {
...@@ -300,7 +268,7 @@ export default defineComponent({ ...@@ -300,7 +268,7 @@ export default defineComponent({
} }
#right-content { #right-content {
height: calc(100% - 46px); height: calc(100% - 50px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -310,7 +278,6 @@ export default defineComponent({ ...@@ -310,7 +278,6 @@ export default defineComponent({
padding: 0 6px 0 8px; padding: 0 6px 0 8px;
overflow: auto; overflow: auto;
background-color: #fff;
} }
#splitter-v { #splitter-v {
...@@ -326,7 +293,6 @@ export default defineComponent({ ...@@ -326,7 +293,6 @@ export default defineComponent({
#logs-panel { #logs-panel {
height: 160px; height: 160px;
background-color: #fff;
.ws-status { .ws-status {
padding-left: 8px; padding-left: 8px;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册