日志模型修复

dev_2022-03-03
Jo 3 years ago
parent 422498ecd4
commit df328fca73
  1. 2
      src/components/Sidebar.vue
  2. 2
      src/setting.js
  3. 72
      src/views/data/Data.vue
  4. 42
      src/views/data/Framework.vue
  5. 33
      src/views/data/Introduce.vue
  6. 52
      src/views/data/Product.vue
  7. 43
      src/views/serve/addModel.vue
  8. 8
      src/views/serve/backstage/index.vue
  9. 13
      src/views/serve/backstage/model.vue
  10. 8
      src/views/serve/projectList.vue
  11. 13
      src/views/system/addLog.vue
  12. 26
      src/views/system/manageLog.vue

@ -99,7 +99,7 @@ export default {
},
watch:{
"$route.path":function(val){
this.items.map(e=>{
this.menuList.map(e=>{
if(val.replace('/', '')===e.index){
this.handleSelect(val.replace('/', ''))
this.$forceUpdate();

@ -13,7 +13,7 @@ if (isDev) {
// jumpPath = "http://39.108.250.202/judgmentPoint/";
jumpPath = "http://192.168.31.125:8087/"; // 本地调试-需要启动本地判分点系统
// host = "http://www.huorantech.cn:9000";//线上
host = "http://39.108.250.202:9000";//测试
host = "http://39.108.250.202:9000/";//测试
// host = 'http://192.168.31.151:9000/'// 榕
// host = 'http://192.168.31.137:9000'// 赓
} else if (isTest) {

@ -1,18 +1,12 @@
<template>
<div class="wrap">
<div class="page data">
<div class="tabs" v-if="showTabs">
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{item}}</a>
</div>
<div class="score-table" v-if="active == 'first'">
<Product></Product>
</div>
<div class="score-table" v-else-if="active == 'second'">
<Framework></Framework>
</div>
<div class="score-table" v-else>
<Introduce></Introduce>
</div>
<Product v-if="active == 'first'"></Product>
<Framework v-else-if="active == 'second'"></Framework>
<Introduce v-else></Introduce>
</div>
</template>
@ -65,60 +59,8 @@ export default {
</script>
<style lang="scss" scoped>
.wrap {
width: 100%;
box-shadow: 0px 0px 21px 0px rgba(48, 115, 248, 0.1);
text-align: center;
overflow: hidden;
.header {
width: 97%;
display: flex;
justify-content: space-between;
margin: 0 auto;
margin-top: 16px;
p {
margin-top: 14px;
font-size: 20px;
font-family: MicrosoftYaHeil;
color: #333333;
}
}
.score-table {
margin: 18px auto 0;
position: relative;
.block {
position: absolute;
right: 0px;
bottom: -50px;
}
}
.el-pagination.is-background .el-pager li:not(.disabled).active {
background-color: #9278ff;
color: #fff;
}
}
/deep/.tabs{
display: flex;
align-items: center;
padding: 20px 1.5% 20px;
margin: 0;
z-index: 999;
background-color: #fff;
.item{
padding: 12px 20px;
margin-right: 10px;
color:#606266;
line-height: 1;
border-radius: 4px;
background-color: #fff;
border: 1px solid #dcdfe6;
cursor: pointer;
&.active{
color: #fff;
background-color: #9278ff;
border-color: #9278ff;
}
}
.data {
min-height: 100%;
padding: 0;
}
</style>

@ -1,8 +1,7 @@
<template>
<div class="wrap">
<el-container>
<!-- 左边的分类 -->
<el-aside width="300px">
<div class="side">
<div class="plus">
<i class="el-icon-circle-plus-outline" @click.stop="addType(0)"></i>
</div>
@ -16,10 +15,9 @@
</span>
</span>
</el-tree>
</el-aside>
</div>
<!-- 右边的表 -->
<el-main style="padding-top: 0">
<el-card class="main-wrap" shadow="hover">
<div class="right">
<el-form label-width="80px" class="flex-between mgb20">
<div class="flex-center">
<el-form-item label="更新时间" style="margin: 0 20px 0 0">
@ -62,9 +60,7 @@
<el-pagination background layout="total, prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total">
</el-pagination>
</div>
</el-card>
</el-main>
</el-container>
</div>
<!-- 导入数据 -->
<el-dialog title="导入" :visible.sync="importVisible" width="80%" center @close="closeImport" class="dialog" :close-on-click-modal="false">
<el-container style="padding: 20px 0 20px 20px;background-color: #f0f0f0;">
@ -740,19 +736,19 @@ export default {
};
</script>
<style lang="scss" scoped>
.wrap, .el-container{
min-height: calc(100vh - 290px);
}
.el-aside, .main-wrap{
height: calc(100vh - 290px);
overflow: auto;
}
/deep/.el-container{
height: 100%;
padding-bottom: 0;
.el-aside{
padding: 15px;
background-color: #fff;
.wrap {
display: flex;
padding: 0 24px;
.side {
width: 300px;
padding: 24px 10px 24px 0;
margin-right: 24px;
border-right: 1px solid rgba(0, 0, 0, 0.06);
}
.right {
width: calc(100% - 374px);
padding: 24px 0;
}
.plus{
text-align: right;
color: #9278FF;
@ -771,8 +767,4 @@ export default {
}
}
}
.el-main{
height: 100%;
}
}
</style>

@ -1,12 +1,10 @@
<template>
<div>
<el-container>
<el-aside width="350px">
<div class="wrap">
<div class="side">
<el-tree ref="type" :data="typeList" node-key="id" accordion :default-expanded-keys="defaultActive" :current-node-key="categoryId" :props="defaultProps" :highlight-current="true" @current-change="typeClick"></el-tree>
</el-aside>
</div>
<el-main style="padding-top: 0">
<el-card shadow="hover" class="card">
<div class="right">
<div class="flex-between" style="margin-bottom: 10px;">
<p>数据简介</p>
<el-button v-if="introduceText && !editing" type="primary" @click="editing = !editing" v-auth="'/data:数据简介:编辑'">编辑</el-button>
@ -48,9 +46,7 @@
<el-button @click="editing = false"> </el-button>
<el-button type="primary" @click="confirmData"> </el-button>
</div>
</el-card>
</el-main>
</el-container>
</div>
</div>
</template>
<script>
@ -214,15 +210,18 @@ export default {
};
</script>
<style lang="scss" scoped>
.el-aside, .card {
height: calc(100vh - 290px);
overflow: auto;
.wrap {
display: flex;
padding: 0 24px;
.side {
width: 300px;
padding: 24px 10px 24px 0;
margin-right: 24px;
border-right: 1px solid rgba(0, 0, 0, 0.06);
}
/deep/.el-container{
background-color: #f0f0f0;
.el-aside{
padding: 15px;
background-color: #fff;
.right {
width: calc(100% - 374px);
padding: 24px 0;
}
.intro{
padding: 20px;

@ -1,37 +1,26 @@
<template>
<div>
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
<span>筛选</span>
</div>
<div>
<el-form label-width="80px" class="flex-between">
<div class="flex-center no-mb">
<el-form-item label="创建日期">
<div class="page">
<h6 class="p-title">筛选</h6>
<div class="tool">
<ul class="filter">
<li>
<label>创建日期</label>
<el-date-picker v-model="date" align="right" unlink-panels type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable></el-date-picker>
</el-form-item>
<el-form-item label="状态">
</li>
<li>
<label>状态</label>
<el-select v-model="status" clearable placeholder="请选择状态" @change="initData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
</div>
<el-form-item>
</li>
</ul>
<div>
<el-input placeholder="请输入产品名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</el-form-item>
</el-form>
</div>
</div>
</el-card>
<el-card shadow="hover" class="card">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="hr_tag"></p>
<span>产品列表</span>
</div>
<div class="tool">
<div></div>
<div>
<el-button type="primary" round @click="add" v-auth="'/data:产品管理:新增'">新增</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth="'/data:产品管理:批量删除'">批量删除</el-button>
@ -62,7 +51,6 @@
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChange" :current-page="page" :total="totals"></el-pagination>
</div>
</el-card>
<el-dialog :title="isDetail ? '查看产品' : (id ? '编辑产品' : '新增产品')" :visible.sync="productVisible" width="30%" center @close="closeProduct" class="dialog" :close-on-click-modal="false">
<el-form ref="form" label-width="98px" :disabled="isDetail">
@ -635,21 +623,9 @@ export default {
</script>
<style lang="scss" scoped>
.card {
min-height: calc(100vh - 420px);
}
/deep/ .no-mb .el-form-item{
margin-bottom: 0;
}
/deep/.el-input--suffix .el-input__inner{
padding-right: 56px;
}
/deep/.el-container{
.el-aside{
padding: 15px;
background-color: #fff;
}
}
.type-wrap{
height: 450px;
overflow:auto;

@ -16,16 +16,18 @@
<el-card shadow="hover">
<el-form label-width="80px" :disabled="isDetail">
<el-form-item label="模型名称">
<div class="item name">
<label>模型名称</label>
<el-input placeholder="请输入模型名称" v-model="form.modelName" maxlength="25" style="width: 400px"></el-input>
</el-form-item>
<el-form-item label="模型代码">
</div>
<div class="item code">
<label>模型代码</label>
<codemirror
:key="codeKey"
:code.sync="form.modelDemo"
:readOnly="isDetail"
></codemirror>
</el-form-item>
</div>
</el-form>
</el-card>
</div>
@ -46,7 +48,8 @@ export default {
modelName: '',
modelDemo: ''
},
codeKey: 1
codeKey: 1,
submiting: false
};
},
mounted() {
@ -75,10 +78,12 @@ export default {
},
//
submit(postStatus){
if (this.submiting) return false
const { modelName, modelDemo } = this.form
const id = this.id
if (!modelName) return this.$message.error('请输入模型名称')
if (!modelDemo) return this.$message.error('请输入模型代码')
this.submiting = true
const data = {
categoryId: this.categoryId,
modelName,
@ -90,12 +95,16 @@ export default {
this.$post(this.api.updateSysModelDemo, data).then(res => {
this.$message.success('编辑成功')
this.$router.back()
}).catch(res => {})
}).catch(res => {
this.submiting = false
})
} else {
this.$post(this.api.saveSysModelDemo, data).then(res => {
this.$message.success('新增成功')
this.$router.back()
}).catch(res => {})
}).catch(res => {
this.submiting = false
})
}
},
}
@ -103,5 +112,23 @@ export default {
</script>
<style lang="scss" scoped>
.item {
display: flex;
margin-bottom: 20px;
label {
padding: 0 15px 0 20px;
}
&.name {
align-items: center;
label {
text-align: right;
}
}
&.code {
flex-direction: column;
label {
margin-bottom: 15px;
}
}
}
</style>

@ -1,4 +1,8 @@
<template>
<div>
<el-card shadow="hover" class="mgb20">
<el-page-header :content="'系统后台 / '+ $route.query.name" @back="back"></el-page-header>
</el-card>
<div class="page" style="padding: 0">
<div class="tabs">
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{ item }}</a>
@ -7,6 +11,7 @@
<model v-if="active == 'model'"></model>
<sourceModel v-if="active == 'sourceModel'"></sourceModel>
</div>
</div>
</template>
<script>
@ -40,6 +45,9 @@ export default {
type: index
}
})
},
back() {
this.$router.push('/configure')
}
}
};

@ -72,7 +72,8 @@ export default {
multipleSelection: [],
modelVisible: false,
modelLoading: false,
modelData: []
modelData: [],
submiting: false
};
},
components: {
@ -211,10 +212,13 @@ export default {
},
//
submit() {
if (this.submiting) return false
const data = []
const systemId = this.systemId
const list = this.$refs.model.getCheckedNodes() //
const categoryId = this.$refs.tree.$refs.tree.getCurrentKey() //
if (!list.length) return this.$message.error('请选择模型')
this.submiting = true
list.map(e => {
// categoryId
e.categoryId && data.push({
@ -226,7 +230,12 @@ export default {
this.$post(this.api.saveReferenceDemo, data).then(res => {
this.modelVisible = false
this.initData()
}).catch(res => {})
setTimeout(() => {
this.submiting = false
}, 2000)
}).catch(res => {
this.submiting = false
})
}
}
};

@ -1,13 +1,9 @@
<template>
<div>
<el-row :gutter="20">
<el-col :span="24">
<el-card v-if="showBack" shadow="hover" class="mgb20">
<el-page-header :content="'实验项目管理 / '+titleName" @back="goBack"></el-page-header>
</el-card>
</el-col>
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-center mgb20">
@ -55,9 +51,7 @@
</el-form>
</div>
</el-card>
</el-col>
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<div class="flex-between mgb20">
<div class="flex-center">
@ -117,8 +111,6 @@
<el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</el-card>
</el-col>
</el-row>
<!--复制对话框-->
<el-dialog title="复制" :visible.sync="copyVisible" width="24%" center :close-on-click-modal="false">

@ -103,7 +103,8 @@ export default {
originContent: {
type: '',
content: ''
}
},
submiting: false
};
},
mounted() {
@ -151,10 +152,12 @@ export default {
},
//
submit(draft){
if (this.submiting) return false
const { versionName, logContents } = this.form
const id = this.id
if (!versionName) return this.$message.error('请输入版本标题')
if (!logContents.length || !logContents.find(e => e.type !== '' && e.content)) return this.$message.error('请输入更新内容')
this.submiting = true
const data = {
platformId: this.platformId,
versionName,
@ -168,12 +171,16 @@ export default {
this.$post(this.api.listUpdate, data).then(res => {
this.$message.success('编辑成功')
this.$router.back()
}).catch(res => {})
}).catch(res => {
this.submiting = false
})
} else {
this.$post(this.api.logAdd, data).then(res => {
this.$message.success('新增成功')
this.$router.back()
}).catch(res => {})
}).catch(res => {
this.submiting = false
})
}
},
}

@ -140,15 +140,31 @@ export default {
}).catch(res => {})
}).catch(() => {})
},
//
switchOff(val, row) {
changeStatus(logId, open, draft) {
this.$post(this.api.listUpdate, {
logId: row.logId,
open: val
logId,
open,
draft
}).then(res => {
this.$message.success(val ? '禁用成功' : '启用成功')
this.$message.success(open ? '禁用成功' : '启用成功')
this.getData()
}).catch(res => {})
},
//
switchOff(val, row) {
const logId = row.logId
if (row.draft && !val) {
this.$confirm('是否要发布该日志?', '提示', {
type: 'success'
}).then(() => {
this.changeStatus(logId, val, 0)
}).catch(() => {
this.changeStatus(logId, val, 1)
})
} else {
this.changeStatus(logId, val, row.draft)
}
},
//
verChange(i) {
document.querySelector(`#ver${i}`).scrollIntoView()

Loading…
Cancel
Save