Commit 5353d251 authored by Wallen姚文辉's avatar Wallen姚文辉

修复添加项目不更新视图的bug

parent 667f82c8
.layout{border:1px solid #d7dde4;background:#f5f7f9;position:relative;border-radius:4px;overflow:hidden}.layout-logo{width:100px;height:30px;background:#5b6270;border-radius:3px;float:left;position:relative;top:15px;left:20px}.layout-nav{margin:0 auto;display:flex}.card{height:300px;background:rgba(103,176,185,.7);transform:translateY(90%);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);border-radius:30px 5px 15px 5px;text-align:center}.login{max-width:400px;margin:0 auto!important;transform:translateY(40%)}.chart{height:100vh}.info-card{margin:10px 5px 10px 5px;background-color:#fff;border-radius:8px;box-shadow:0 0 8px 0 hsla(0,0%,71%,.58)}#my_table{text-align:left;width:90%;margin:0 10px 10px 10px;margin-right:auto;margin-left:auto}#my-table td:first-child{width:80%}#my-table td:nth-child(2){width:10%}.header_style{border-bottom:1px solid #dcdee2}.center_style{width:90%;margin:auto}.background_sytle{background-color:#f8f8f9;padding-top:.5px;padding-bottom:.5px;border-radius:8px;margin-top:2px;margin-bottom:2px}.near_left{width:25%;display:inline-block;height:100%}.near_right{width:75%;display:inline-block}.fontstyle{text-align:left}@keyframes changDeg{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.demo-spin-icon-load{color:#2b85e4;animation:changDeg 2s linear .2s infinite}a{text-decoration:none}a:hover{text-decoration:underline}.editbutton:hover{background-color:#c6e2ff}.fileBox{display:flex;flex-wrap:wrap;margin-top:20px;min-height:170px;background-color:beige}.file{height:150px;width:150px;margin:10px 10px 10px 10px;text-align:center;border-radius:10px}.pop{position:absolute;background:#fff;box-shadow:1px 1px 4px #888;font-size:12px;border-radius:5px;z-index:999}.pop>div{margin:15px 10px;cursor:pointer}#sheet{flex:1}.phone{width:250px;height:500px;background-color:#e7f6ff;border-radius:20px;border-style:outset;border-width:10px;border-color:#18172c;text-align:center}.transition-box{margin-top:32px;width:100%;border-radius:4px;background-color:#409eff;text-align:center;color:#fff;padding:24px 0}.table{width:100%;margin-bottom:1rem;border-collapse:collapse;color:#212529}.table-bordered{border:1px solid #dee2e6}.table>tbody>tr>td,.table>thead>tr>td{border:1px solid #dee2e6;vertical-align:top}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.danger{background-color:#f2dede}.nochange{background-color:#dcdee2}.bg-danger{background-color:#dc3545!important}.bg-warning{background-color:#ffc107!important}.bg-success{background-color:#28a745!important}.progress-bar{flex-direction:column;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}.progress,.progress-bar{display:flex;overflow:hidden}.progress{height:1rem;line-height:0;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}body{font-family:sans-serif;font-size:1em;font-kerning:normal;font-variant-ligatures:common-ligatures;text-rendering:optimizeLegibility;padding-top:10px}.popover{max-width:none}.octicon{margin-right:.25em;vertical-align:baseline;width:.75em}.table-bordered>thead>tr>td{border-bottom-width:1px}.table tbody>tr>td,.table thead>tr>td{padding-top:3px;padding-bottom:3px}.table-condensed tbody>tr>td{padding-top:0;padding-bottom:0}.table .progress{margin-bottom:inherit}.table-borderless td,.table-borderless th{border:0!important}.table tbody tr.covered-by-large-tests,li.covered-by-large-tests,li.success,span.success,td.success,tr.success{background-color:#dff0d8}.table tbody tr.covered-by-medium-tests,li.covered-by-medium-tests{background-color:#c3e3b5}.table tbody tr.covered-by-small-tests,li.covered-by-small-tests{background-color:#99cb84}.table tbody td.danger,.table tbody tr.danger,li.danger,span.danger{background-color:#f2dede}.table tbody td.warning,.table tbody tr.warning,li.warning,span.warning{background-color:#fcf8e3}.table tbody td.info{background-color:#d9edf7}td.big{vertical-align:middle;width:117px}td.codeLine{font-family:Source Code Pro,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;white-space:pre-wrap}td span.comment{color:#888a85}td span.default{color:#2e3436}td span.html{color:#888a85}td span.keyword{color:#2e3436;font-weight:700}pre span.string{color:#2e3436}span.danger,span.success,span.warning{margin-right:2px;padding-left:10px;padding-right:10px;text-align:center}#toplink{position:fixed;left:5px;bottom:5px;outline:0}svg text{font-family:Lucida Grande,Lucida Sans Unicode,Verdana,Arial,Helvetica,sans-serif;font-size:11px;color:#666;fill:#666}.scrollbox{height:245px;overflow-x:scroll;overflow-y:scroll}table+.structure-heading{border-top:1px solid #d3d3d3;padding-top:.5em}.legend{font-weight:700;margin-right:2px;padding-left:10px;padding-right:10px;text-align:center}.covered-by-small-tests{background-color:#99cb84}.covered-by-medium-tests{background-color:#c3e3b5}.covered-by-large-tests{background-color:#dff0d8}.not-covered{background-color:#f2dede}.not-coverable{background-color:#fcf8e3}.vertical-center-modal{display:flex;align-items:center;justify-content:center}.vertical-center-modal .ivu-modal{top:0}
\ No newline at end of file
.layout{border:1px solid #d7dde4;background:#f5f7f9;position:relative;border-radius:4px;overflow:hidden}.layout-logo{width:100px;height:30px;background:#5b6270;border-radius:3px;float:left;position:relative;top:15px;left:20px}.layout-nav{margin:0 auto;display:flex}.card{height:300px;background:rgba(103,176,185,.7);transform:translateY(90%);backdrop-filter:blur(5px);border-radius:30px 5px 15px 5px;text-align:center}.login{max-width:400px;margin:0 auto!important;transform:translateY(40%)}.chart{height:100vh}.info-card{margin:10px 5px 10px 5px;background-color:#fff;border-radius:8px;box-shadow:0 0 8px 0 hsla(0,0%,71%,.58)}#my_table{text-align:left;width:90%;margin:0 10px 10px 10px;margin-right:auto;margin-left:auto}#my-table td:first-child{width:80%}#my-table td:nth-child(2){width:10%}.header_style{border-bottom:1px solid #dcdee2}.center_style{width:90%;margin:auto}.background_sytle{background-color:#f8f8f9;padding-top:.5px;padding-bottom:.5px;border-radius:8px;margin-top:2px;margin-bottom:2px}.near_left{width:25%;display:inline-block;height:100%}.near_right{width:75%;display:inline-block}.fontstyle{text-align:left}@keyframes changDeg{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.demo-spin-icon-load{color:#2b85e4;animation:changDeg 2s linear .2s infinite}a{text-decoration:none}a:hover{text-decoration:underline}.editbutton:hover{background-color:#c6e2ff}.fileBox{display:flex;flex-wrap:wrap;margin-top:20px;min-height:170px;background-color:beige}.file{height:150px;width:150px;margin:10px 10px 10px 10px;text-align:center;border-radius:10px}.pop{position:absolute;background:#fff;box-shadow:1px 1px 4px #888;font-size:12px;border-radius:5px;z-index:999}.pop>div{margin:15px 10px;cursor:pointer}#sheet{flex:1}.phone{width:250px;height:500px;background-color:#e7f6ff;border-radius:20px;border-style:outset;border-width:10px;border-color:#18172c;text-align:center}.transition-box{margin-top:32px;width:100%;border-radius:4px;background-color:#409eff;text-align:center;color:#fff;padding:24px 0}.table{width:100%;margin-bottom:1rem;border-collapse:collapse;color:#212529}.table-bordered{border:1px solid #dee2e6}.table>tbody>tr>td,.table>thead>tr>td{border:1px solid #dee2e6;vertical-align:top}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.danger{background-color:#f2dede}.nochange{background-color:#dcdee2}.bg-danger{background-color:#dc3545!important}.bg-warning{background-color:#ffc107!important}.bg-success{background-color:#28a745!important}.progress-bar{flex-direction:column;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}.progress,.progress-bar{display:flex;overflow:hidden}.progress{height:1rem;line-height:0;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}body{font-family:sans-serif;font-size:1em;font-kerning:normal;font-variant-ligatures:common-ligatures;text-rendering:optimizeLegibility;padding-top:10px}.popover{max-width:none}.octicon{margin-right:.25em;vertical-align:baseline;width:.75em}.table-bordered>thead>tr>td{border-bottom-width:1px}.table tbody>tr>td,.table thead>tr>td{padding-top:3px;padding-bottom:3px}.table-condensed tbody>tr>td{padding-top:0;padding-bottom:0}.table .progress{margin-bottom:inherit}.table-borderless td,.table-borderless th{border:0!important}.table tbody tr.covered-by-large-tests,li.covered-by-large-tests,li.success,span.success,td.success,tr.success{background-color:#dff0d8}.table tbody tr.covered-by-medium-tests,li.covered-by-medium-tests{background-color:#c3e3b5}.table tbody tr.covered-by-small-tests,li.covered-by-small-tests{background-color:#99cb84}.table tbody td.danger,.table tbody tr.danger,li.danger,span.danger{background-color:#f2dede}.table tbody td.warning,.table tbody tr.warning,li.warning,span.warning{background-color:#fcf8e3}.table tbody td.info{background-color:#d9edf7}td.big{vertical-align:middle;width:117px}td.codeLine{font-family:Source Code Pro,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;white-space:pre-wrap}td span.comment{color:#888a85}td span.default{color:#2e3436}td span.html{color:#888a85}td span.keyword{color:#2e3436;font-weight:700}pre span.string{color:#2e3436}span.danger,span.success,span.warning{margin-right:2px;padding-left:10px;padding-right:10px;text-align:center}#toplink{position:fixed;left:5px;bottom:5px;outline:0}svg text{font-family:Lucida Grande,Lucida Sans Unicode,Verdana,Arial,Helvetica,sans-serif;font-size:11px;color:#666;fill:#666}.scrollbox{height:245px;overflow-x:scroll;overflow-y:scroll}table+.structure-heading{border-top:1px solid #d3d3d3;padding-top:.5em}.legend{font-weight:700;margin-right:2px;padding-left:10px;padding-right:10px;text-align:center}.covered-by-small-tests{background-color:#99cb84}.covered-by-medium-tests{background-color:#c3e3b5}.covered-by-large-tests{background-color:#dff0d8}.not-covered{background-color:#f2dede}.not-coverable{background-color:#fcf8e3}.vertical-center-modal{display:flex;align-items:center;justify-content:center}.vertical-center-modal .ivu-modal{top:0}
\ No newline at end of file
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="/dist/plugins/css/pluginsCss.css"/><link rel="stylesheet" href="/dist/plugins/plugins.css"/><link rel="stylesheet" href="/dist/css/luckysheet.css"/><link rel="stylesheet" href="/dist/assets/iconfont/iconfont.css"/><script src="/dist/plugins/js/plugin.js"></script><script src="/dist/luckysheet.umd.js"></script><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.e401b6aa.js"></script><script defer="defer" src="/js/app.abdacdaa.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.57e60919.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but yinhe_test doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="/dist/plugins/css/pluginsCss.css"/><link rel="stylesheet" href="/dist/plugins/plugins.css"/><link rel="stylesheet" href="/dist/css/luckysheet.css"/><link rel="stylesheet" href="/dist/assets/iconfont/iconfont.css"/><script src="/dist/plugins/js/plugin.js"></script><script src="/dist/luckysheet.umd.js"></script><title>yinhe_test</title><script defer="defer" src="/js/chunk-vendors.2cb101ab.js"></script><script defer="defer" src="/js/app.af9441aa.js"></script><link href="/css/chunk-vendors.187ae3e6.css" rel="stylesheet"><link href="/css/app.a162d9fa.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but yinhe_test doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5235,6 +5235,26 @@
"lodash.uniq": "^4.5.0"
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001714",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001714.tgz",
"integrity": "sha512-mtgapdwDLSSBnCI3JokHM7oEQBLxiJKVRtg10AxM1AyeiKcM96f0Mkbqeq+1AbiCtvMcHRulAAEMu693JrSWqg==",
"dev": true,
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
]
},
"node_modules/case-sensitive-paths-webpack-plugin": {
"version": "2.4.0",
"resolved": "https://registry.npmmirror.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz",
......
<template>
<PageHeader :title="title">
<template #action>
<Switch true-color="#13ce66" size="large" false-color="#17233d" v-model="state" :true-value="1" :false-value="0">
<Switch true-color="#13ce66" size="large" false-color="#17233d" v-model="state" :true-value="1"
:false-value="0">
<template #open>增量</template>
<template #close>全量</template>
</Switch>
......@@ -49,12 +50,11 @@
</thead>
<tbody>
<template v-for="item in dirInfo">
<tr v-if="!state||state&&item.change">
<tr v-if="!state || state && item.change">
<td :class="getStatus(item, 0, 1)" v-if="item.source == 'Total'">总计</td>
<td :class="getStatus(item, 0, 1)" v-else>
<template v-if="!render_type">
<img src="@/assets/file-directory.svg"
class="octicon">
<img src="@/assets/file-directory.svg" class="octicon">
<a @click="path.push(item.source)">{{ item.source }}</a>
</template>
<template v-else>
......@@ -64,7 +64,8 @@
</template>
<template v-else>
&nbsp;
<a :href="'#' + item.start"><abbr :title="item.source + '()'">{{ item.source
<a :href="'#' + item.start"><abbr :title="item.source + '()'">{{
item.source
}}</abbr></a>
</template>
</template>
......@@ -132,9 +133,9 @@ const modal = ref(false)
const choicedkey = ref(null)
const spinShow=ref(false)
const spinShow = ref(false)
const proList = ref(['galaxy-crm', 'ServerSiteMirocs', 'PresaleMicros','FlowMicros'])
const proList = ref(['galaxy-crm', 'ServerSiteMirocs', 'PresaleMicros', 'FlowMicros'])
/**
......@@ -160,7 +161,7 @@ const searchinfo = reactive({
/**
* 0-全量 1-增量
*/
const state = ref(localStorage.getItem('state')&&parseInt(localStorage.getItem('state'))||0)
const state = ref(localStorage.getItem('state') && parseInt(localStorage.getItem('state')) || 0)
/**
*
......@@ -216,7 +217,7 @@ function getStatus(item, type, who) {
let [all, cover] = getcoverInfo(item, who)
if (all == -1) return ''
if (!cover && cover != 0) return ''
if ( all==0 || (cover / all) < 0.5) {
if (all == 0 || (cover / all) < 0.5) {
return type ? 'bg-danger' : 'danger'
} else if ((cover / all) < 0.9) {
return type ? 'bg-warning' : 'warning'
......@@ -241,7 +242,7 @@ function getLogs(callback = () => { }) {
function addLogs() {
request("post", "/codecover/addlog", searchinfo, this, () => {
choicedkey.value = searchinfo.product_key; searchinfo.product = null; searchinfo.product_key = null; searchinfo.commit_source = null; searchinfo.commit_target = null;getLogs();
choicedkey.value = searchinfo.product_key; searchinfo.product = null; searchinfo.product_key = null; searchinfo.commit_source = null; searchinfo.commit_target = null; getLogs(()=>{render_key(choicedkey.value,path.value)});
})
}
......@@ -269,6 +270,13 @@ function handleDragDrop(name, newName, a, b, names) {
})
}
function render_key(value,path){
spinShow.value = true
request("get", "/codecover/dirinfo", { key: value, path: path.join('/') }, this, (res) => {
dirInfo.value = res.data;
spinShow.value = false
})
}
watch(
() => choicedkey.value,
......@@ -276,11 +284,7 @@ watch(
path.value.length = 0
render_type.value = 0
console.info(newVal, oldVal)
spinShow.value=true
request("get", "/codecover/dirinfo", { key: newVal, path: path.value.join('/') }, this, (res) => {
dirInfo.value = res.data;
spinShow.value=false
})
render_key(newVal,path.value)
})
watch(
......@@ -288,19 +292,16 @@ watch(
(newVal, oldVal) => {
if (newVal.length == 0 || newVal[newVal.length - 1].indexOf('.') == -1) {
render_type.value = 0
spinShow.value=true
request("get", "/codecover/dirinfo", { key: choicedkey.value, path: newVal.join('/') }, this, (res) => {
dirInfo.value = res.data;
spinShow.value=false
})
spinShow.value = true
render_key(choicedkey.value,newVal)
} else {
render_type.value = 1
spinShow.value=true
spinShow.value = true
request("get", "/codecover/fileinfo", { key: choicedkey.value, path: newVal.join('/') }, this, (res) => {
fileAll.value = res.data.all;
fileChange.value = res.data.change;
dirInfo.value = res.data.coverInfo;
spinShow.value=false
spinShow.value = false
})
}
}, {
......@@ -310,7 +311,7 @@ watch(
watch(
() => state.value,
(newVal, oldVal) => {
localStorage.setItem('state',newVal)
localStorage.setItem('state', newVal)
})
onMounted(() => {
......@@ -353,7 +354,7 @@ onMounted(() => {
background-color: #f2dede;
}
.nochange{
.nochange {
background-color: #dcdee2;
}
......
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