日志模型修复

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. 180
      src/views/data/Framework.vue
  5. 119
      src/views/data/Introduce.vue
  6. 122
      src/views/data/Product.vue
  7. 43
      src/views/serve/addModel.vue
  8. 20
      src/views/serve/backstage/index.vue
  9. 13
      src/views/serve/backstage/model.vue
  10. 226
      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:{ watch:{
"$route.path":function(val){ "$route.path":function(val){
this.items.map(e=>{ this.menuList.map(e=>{
if(val.replace('/', '')===e.index){ if(val.replace('/', '')===e.index){
this.handleSelect(val.replace('/', '')) this.handleSelect(val.replace('/', ''))
this.$forceUpdate(); this.$forceUpdate();

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

@ -1,18 +1,12 @@
<template> <template>
<div class="wrap"> <div class="page data">
<div class="tabs" v-if="showTabs"> <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> <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{item}}</a>
</div> </div>
<div class="score-table" v-if="active == 'first'"> <Product v-if="active == 'first'"></Product>
<Product></Product> <Framework v-else-if="active == 'second'"></Framework>
</div> <Introduce v-else></Introduce>
<div class="score-table" v-else-if="active == 'second'">
<Framework></Framework>
</div>
<div class="score-table" v-else>
<Introduce></Introduce>
</div>
</div> </div>
</template> </template>
@ -65,60 +59,8 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap { .data {
width: 100%; min-height: 100%;
box-shadow: 0px 0px 21px 0px rgba(48, 115, 248, 0.1); padding: 0;
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;
}
}
} }
</style> </style>

@ -1,70 +1,66 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-container>
<!-- 左边的分类 --> <!-- 左边的分类 -->
<el-aside width="300px"> <div class="side">
<div class="plus"> <div class="plus">
<i class="el-icon-circle-plus-outline" @click.stop="addType(0)"></i> <i class="el-icon-circle-plus-outline" @click.stop="addType(0)"></i>
</div> </div>
<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 ref="type" :data="typeList" node-key="id" accordion :default-expanded-keys="defaultActive" :current-node-key="categoryId" :props="defaultProps" :highlight-current="true" @current-change="typeClick">
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span :title="node.label">{{ node.label }}</span> <span :title="node.label">{{ node.label }}</span>
<span class="actions"> <span class="actions">
<i class="el-icon-circle-plus-outline" @click.stop="addType(node)" v-if="data.level != 6" v-auth="'/data:数据架构:新增分类'"></i> <i class="el-icon-circle-plus-outline" @click.stop="addType(node)" v-if="data.level != 6" v-auth="'/data:数据架构:新增分类'"></i>
<i class="el-icon-edit" @click.stop="editType(node)" v-auth="'/data:数据架构:编辑分类'"></i> <i class="el-icon-edit" @click.stop="editType(node)" v-auth="'/data:数据架构:编辑分类'"></i>
<i class="el-icon-delete" @click.stop="delType(node)" v-auth="'/data:数据架构:删除分类'"></i> <i class="el-icon-delete" @click.stop="delType(node)" v-auth="'/data:数据架构:删除分类'"></i>
</span>
</span> </span>
</el-tree> </span>
</el-aside> </el-tree>
<!-- 右边的表 --> </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"> <el-form label-width="80px" class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<el-form-item label="更新时间" style="margin: 0 20px 0 0"> <el-form-item label="更新时间" style="margin: 0 20px 0 0">
<el-date-picker v-model="updateTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="initData"></el-date-picker> <el-date-picker v-model="updateTime" type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="initData"></el-date-picker>
</el-form-item> </el-form-item>
<el-input placeholder="请输入数据表名称" v-model="keyword" prefix-icon="el-icon-search" clearable></el-input> <el-input placeholder="请输入数据表名称" v-model="keyword" prefix-icon="el-icon-search" clearable></el-input>
</div> </div>
<div> <div>
<el-button type="primary" round @click="batchImport" v-auth="'/data:数据架构:导入数据'">导入数据</el-button> <el-button type="primary" round @click="batchImport" v-auth="'/data:数据架构:导入数据'">导入数据</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth="'/data:数据架构:批量删除'">批量删除</el-button> <el-button type="primary" round @click="delAllSelection" v-auth="'/data:数据架构:批量删除'">批量删除</el-button>
</div> </div>
</el-form> </el-form>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange"> <el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="70" label="序号" align="center"></el-table-column> <el-table-column type="index" width="70" label="序号" align="center"></el-table-column>
<el-table-column prop="tableComment" label="数据表名称" align="center"> <el-table-column prop="tableComment" label="数据表名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.tableComment ? scope.row.tableComment : scope.row.showName}} {{scope.row.tableComment ? scope.row.tableComment : scope.row.showName}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="showName" label="产品表名称" align="center"></el-table-column> <el-table-column prop="showName" label="产品表名称" align="center"></el-table-column>
<el-table-column prop="timeRange" label="起止日期" width="180" align="center"></el-table-column> <el-table-column prop="timeRange" label="起止日期" width="180" align="center"></el-table-column>
<el-table-column prop="dataTotal" label="数据总量" width="100" align="center"></el-table-column> <el-table-column prop="dataTotal" label="数据总量" width="100" align="center"></el-table-column>
<el-table-column prop="dataSize" label="数据大小" width="100" align="center"> <el-table-column prop="dataSize" label="数据大小" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.dataSize}}M {{scope.row.dataSize}}M
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateTime" label="更新时间" width="180" align="center"></el-table-column> <el-table-column prop="updateTime" label="更新时间" width="180" align="center"></el-table-column>
<el-table-column label="操作" width="260" align="center"> <el-table-column label="操作" width="260" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)" v-auth="'/data:数据架构:预览'">预览</el-button> <el-button type="text" @click="preview(scope.row)" v-auth="'/data:数据架构:预览'">预览</el-button>
<el-button type="text" @click="delTable(scope.row)" v-auth="'/data:数据架构:删除'">删除</el-button> <el-button type="text" @click="delTable(scope.row)" v-auth="'/data:数据架构:删除'">删除</el-button>
<el-button type="text" @click="editName(scope.row)" v-auth="'/data:数据架构:编辑产品表名'">编辑产品表名</el-button> <el-button type="text" @click="editName(scope.row)" v-auth="'/data:数据架构:编辑产品表名'">编辑产品表名</el-button>
<el-button type="text" @click="editHead(scope.row)" v-auth="'/data:数据架构:编辑产品表头'">编辑产品表头</el-button> <el-button type="text" @click="editHead(scope.row)" v-auth="'/data:数据架构:编辑产品表头'">编辑产品表头</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="total, prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total"> <el-pagination background layout="total, prev, pager, next" :current-page="page" @current-change="handleCurrentChange" :total="total">
</el-pagination> </el-pagination>
</div> </div>
</el-card> </div>
</el-main>
</el-container>
<!-- 导入数据 --> <!-- 导入数据 -->
<el-dialog title="导入" :visible.sync="importVisible" width="80%" center @close="closeImport" class="dialog" :close-on-click-modal="false"> <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;"> <el-container style="padding: 20px 0 20px 20px;background-color: #f0f0f0;">
@ -740,39 +736,35 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap, .el-container{ .wrap {
min-height: calc(100vh - 290px); display: flex;
} padding: 0 24px;
.el-aside, .main-wrap{ .side {
height: calc(100vh - 290px); width: 300px;
overflow: auto; padding: 24px 10px 24px 0;
} margin-right: 24px;
/deep/.el-container{ border-right: 1px solid rgba(0, 0, 0, 0.06);
height: 100%; }
padding-bottom: 0; .right {
.el-aside{ width: calc(100% - 374px);
padding: 15px; padding: 24px 0;
background-color: #fff; }
.plus{ .plus{
text-align: right; text-align: right;
color: #9278FF; color: #9278FF;
cursor: pointer; cursor: pointer;
} }
.custom-tree-node{ .custom-tree-node{
flex: 1; flex: 1;
display: inline-flex; display: inline-flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.actions{ .actions{
i{ i{
margin-left: 5px; margin-left: 5px;
color: #9278FF; color: #9278FF;
}
} }
} }
} }
.el-main{
height: 100%;
}
} }
</style> </style>

@ -1,56 +1,52 @@
<template> <template>
<div> <div class="wrap">
<el-container> <div class="side">
<el-aside width="350px"> <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-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> </div>
</el-aside>
<el-main style="padding-top: 0"> <div class="right">
<el-card shadow="hover" class="card"> <div class="flex-between" style="margin-bottom: 10px;">
<div class="flex-between" style="margin-bottom: 10px;"> <p>数据简介</p>
<p>数据简介</p> <el-button v-if="introduceText && !editing" type="primary" @click="editing = !editing" v-auth="'/data:数据简介:编辑'">编辑</el-button>
<el-button v-if="introduceText && !editing" type="primary" @click="editing = !editing" v-auth="'/data:数据简介:编辑'">编辑</el-button> </div>
</div> <div class="intro" v-if="!introduceText && !editing">
<div class="intro" v-if="!introduceText && !editing"> <p class="text">请添加简介</p>
<p class="text">请添加简介</p> <div class="btn">
<div class="btn"> <el-button type="primary" @click="edit">添加</el-button>
<el-button type="primary" @click="edit">添加</el-button> </div>
</div> </div>
</div> <template v-if="introduceText || editing">
<template v-if="introduceText || editing"> <el-input placeholder="请输入简介" v-model="introduce" type="textarea" rows="5" :disabled="!editing"></el-input>
<el-input placeholder="请输入简介" v-model="introduce" type="textarea" rows="5" :disabled="!editing"></el-input> <div class="field">
<div class="field"> <p class="label">数据源</p>
<p class="label">数据源</p> <el-input style="width: 250px" placeholder="请输入数据源" v-model="dataSource" type="text" :disabled="!editing"></el-input>
<el-input style="width: 250px" placeholder="请输入数据源" v-model="dataSource" type="text" :disabled="!editing"></el-input> </div>
</div> </template>
</template> <div class="field">
<div class="field"> <p class="label">关键字</p>
<p class="label">关键字</p> <div class="tag-add" v-if="editing">
<div class="tag-add" v-if="editing"> <el-input placeholder="请输入关键字" size="small" v-model="newKeyword"></el-input>
<el-input placeholder="请输入关键字" size="small" v-model="newKeyword"></el-input> <span v-if="editing">
<span v-if="editing"> <el-button @click="save" style="color: #9076FF;border: 1px solid #9076FF;border-radius:5px;height: 25px;line-height: 0px"> </el-button>
<el-button @click="save" style="color: #9076FF;border: 1px solid #9076FF;border-radius:5px;height: 25px;line-height: 0px"> </el-button> </span>
</span> </div>
</div> <div class="tag-wrap">
<div class="tag-wrap"> <el-tag
<el-tag :key="tag.id"
:key="tag.id" :type="editing ? '' : 'info'"
:type="editing ? '' : 'info'" v-for="tag in keywordList"
v-for="tag in keywordList" :closable="editing"
:closable="editing" :disable-transitions="false"
:disable-transitions="false" @close="delKeyword(tag)">
@close="delKeyword(tag)"> {{tag.keyword}}
{{tag.keyword}} </el-tag>
</el-tag> </div>
</div> </div>
</div> <div class="btns" v-if="editing">
<div class="btns" v-if="editing"> <el-button @click="editing = false"> </el-button>
<el-button @click="editing = false"> </el-button> <el-button type="primary" @click="confirmData"> </el-button>
<el-button type="primary" @click="confirmData"> </el-button> </div>
</div> </div>
</el-card>
</el-main>
</el-container>
</div> </div>
</template> </template>
<script> <script>
@ -214,15 +210,18 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-aside, .card { .wrap {
height: calc(100vh - 290px); display: flex;
overflow: auto; padding: 0 24px;
} .side {
/deep/.el-container{ width: 300px;
background-color: #f0f0f0; padding: 24px 10px 24px 0;
.el-aside{ margin-right: 24px;
padding: 15px; border-right: 1px solid rgba(0, 0, 0, 0.06);
background-color: #fff; }
.right {
width: calc(100% - 374px);
padding: 24px 0;
} }
.intro{ .intro{
padding: 20px; padding: 20px;

@ -1,68 +1,56 @@
<template> <template>
<div> <div class="page">
<el-card shadow="hover" class="mgb20"> <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>
</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>
</li>
</ul>
<div> <div>
<div class="flex-center mgb20"> <el-input placeholder="请输入产品名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
<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="创建日期">
<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="状态">
<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>
<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>
<el-button type="primary" round @click="add" v-auth="'/data:产品管理:新增'">新增</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth="'/data:产品管理:批量删除'">批量删除</el-button>
</div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> </div>
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <div class="tool">
<el-table-column prop="productName" label="产品名称" align="center"></el-table-column> <div></div>
<el-table-column prop="tableNum" label="数据量(表)" align="center"></el-table-column> <div>
<el-table-column prop="userName" label="创建人" align="center"></el-table-column> <el-button type="primary" round @click="add" v-auth="'/data:产品管理:新增'">新增</el-button>
<el-table-column prop="orderNum" label="订单数量" align="center"></el-table-column> <el-button type="primary" round @click="delAllSelection" v-auth="'/data:产品管理:批量删除'">批量删除</el-button>
<el-table-column prop="market" label="市场价(元)" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="orderNature" label="状态" align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" :active-text="scope.row.status ? '上架' : '下架'" :active-value="1" :inactive-value="0" @change="switchOff($event,scope.row,scope.$index)" v-auth="'/data:产品管理:上架'"></el-switch>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)" v-auth="'/data:产品管理:预览'">预览</el-button>
<el-button type="text" @click="edit(scope.row)" v-auth="'/data:产品管理:编辑'">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth="'/data:产品管理:删除'">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChange" :current-page="page" :total="totals"></el-pagination>
</div> </div>
</el-card> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="productName" label="产品名称" align="center"></el-table-column>
<el-table-column prop="tableNum" label="数据量(表)" align="center"></el-table-column>
<el-table-column prop="userName" label="创建人" align="center"></el-table-column>
<el-table-column prop="orderNum" label="订单数量" align="center"></el-table-column>
<el-table-column prop="market" label="市场价(元)" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="orderNature" label="状态" align="center">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" :active-text="scope.row.status ? '上架' : '下架'" :active-value="1" :inactive-value="0" @change="switchOff($event,scope.row,scope.$index)" v-auth="'/data:产品管理:上架'"></el-switch>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="preview(scope.row)" v-auth="'/data:产品管理:预览'">预览</el-button>
<el-button type="text" @click="edit(scope.row)" v-auth="'/data:产品管理:编辑'">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth="'/data:产品管理:删除'">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChange" :current-page="page" :total="totals"></el-pagination>
</div>
<el-dialog :title="isDetail ? '查看产品' : (id ? '编辑产品' : '新增产品')" :visible.sync="productVisible" width="30%" center @close="closeProduct" class="dialog" :close-on-click-modal="false"> <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"> <el-form ref="form" label-width="98px" :disabled="isDetail">
@ -635,21 +623,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <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{ /deep/.el-input--suffix .el-input__inner{
padding-right: 56px; padding-right: 56px;
} }
/deep/.el-container{
.el-aside{
padding: 15px;
background-color: #fff;
}
}
.type-wrap{ .type-wrap{
height: 450px; height: 450px;
overflow:auto; overflow:auto;

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

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

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

@ -1,124 +1,116 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-card v-if="showBack" shadow="hover" class="mgb20">
<el-col :span="24"> <el-page-header :content="'实验项目管理 / '+titleName" @back="goBack"></el-page-header>
<el-card v-if="showBack" shadow="hover" class="mgb20"> </el-card>
<el-page-header :content="'实验项目管理 / '+titleName" @back="goBack"></el-page-header>
</el-card>
</el-col>
<el-col :span="24"> <el-card shadow="hover" class="mgb20">
<el-card shadow="hover" class="mgb20"> <div>
<div> <div class="flex-center mgb20">
<div class="flex-center mgb20"> <p class="hr_tag"></p>
<p class="hr_tag"></p> <span>筛选</span>
<span>筛选</span> </div>
</div> </div>
</div> <div>
<div> <el-form label-width="80px">
<el-form label-width="80px"> <el-col :span="4">
<el-col :span="4"> <el-form-item label="创建人">
<el-form-item label="创建人"> <el-select v-model="queryData.founder" clearable placeholder="请选择创建人"
<el-select v-model="queryData.founder" clearable placeholder="请选择创建人" @change="initData">
@change="initData"> <el-option v-for="(item,index) in founderList" :key="index" :label="item.label"
<el-option v-for="(item,index) in founderList" :key="index" :label="item.label" :value="item.value"></el-option>
:value="item.value"></el-option> </el-select>
</el-select> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="4">
<el-col :span="4"> <el-form-item label="状态">
<el-form-item label="状态"> <el-select v-model="queryData.state" clearable placeholder="请选择状态" @change="initData">
<el-select v-model="queryData.state" clearable placeholder="请选择状态" @change="initData"> <el-option v-for="(item,index) in stateList" :key="index" :label="item.label"
<el-option v-for="(item,index) in stateList" :key="index" :label="item.label" :value="item.value"></el-option>
:value="item.value"></el-option> </el-select>
</el-select> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="4">
<el-col :span="4"> <el-form-item label="权限">
<el-form-item label="权限"> <el-select v-model="queryData.permissions" placeholder="请选择" @change="initData">
<el-select v-model="queryData.permissions" placeholder="请选择" @change="initData"> <el-option
<el-option v-for="item in permissionsList"
v-for="item in permissionsList" :key="item.value"
:key="item.value" :label="item.label"
:label="item.label" :value="item.value"
:value="item.value" ></el-option>
></el-option> </el-select>
</el-select> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="6">
<el-col :span="6"> <el-form-item>
<el-form-item> <el-input placeholder="请输入项目名称" prefix-icon="el-icon-search"
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
v-model="keyword" clearable></el-input> </el-form-item>
</el-form-item> </el-col>
</el-col> </el-form>
</el-form> </div>
</div> </el-card>
</el-card>
</el-col>
<el-col :span="24"> <el-card shadow="hover" class="mgb20">
<el-card shadow="hover" class="mgb20"> <div class="flex-between mgb20">
<div class="flex-between mgb20"> <div class="flex-center">
<div class="flex-center"> <p class="hr_tag"></p>
<p class="hr_tag"></p> <span>项目列表</span>
<span>项目列表</span> </div>
</div> <div>
<div> <el-button type="primary" round @click="add" class="mag">新增项目</el-button>
<el-button type="primary" round @click="add" class="mag">新增项目</el-button> <el-button type="primary" round @click="delAllData">批量删除</el-button>
<el-button type="primary" round @click="delAllData">批量删除</el-button> </div>
</div> </div>
</div> <el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="projectId"
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="projectId" @selection-change="handleSelectionChange">
@selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center">
<el-table-column type="index" width="100" label="序号" align="center"> <template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template>
<template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template> </el-table-column>
</el-table-column> <el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column>
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column> <el-table-column v-if='queryData.founder == 1' prop="schoolName" label="学校名字" align="center"></el-table-column>
<el-table-column v-if='queryData.founder == 1' prop="schoolName" label="学校名字" align="center"></el-table-column> <el-table-column prop="founder" label="创建人" align="center">
<el-table-column prop="founder" label="创建人" align="center"> <template slot-scope="scope">
<template slot-scope="scope"> {{ founderKeys[scope.row.founder] }}
{{ founderKeys[scope.row.founder] }} </template>
</template> </el-table-column>
</el-table-column> <el-table-column label="权限" align="center">
<el-table-column label="权限" align="center"> <template slot-scope="scope">
<template slot-scope="scope"> {{ permissionsKeys[scope.row.permissions] }}
{{ permissionsKeys[scope.row.permissions] }} </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <el-table-column prop="status" label="状态" align="center">
<el-table-column prop="status" label="状态" align="center"> <template slot-scope="scope">
<template slot-scope="scope"> {{ stateKeys[scope.row.state] }}
{{ stateKeys[scope.row.state] }} </template>
</template> </el-table-column>
</el-table-column> <el-table-column label="操作" align="center">
<el-table-column label="操作" align="center"> <template slot-scope="scope">
<template slot-scope="scope"> <el-button type="text" @click="edit(scope.row)">
<el-button type="text" @click="edit(scope.row)"> 编辑
编辑 </el-button>
</el-button> <el-button type="text" @click="handleDelete(scope.row.projectId)">
<el-button type="text" @click="handleDelete(scope.row.projectId)"> 删除
删除 </el-button>
</el-button> <el-button type="text" @click="copyData(scope.row.projectId)">复制</el-button>
<el-button type="text" @click="copyData(scope.row.projectId)">复制</el-button> <el-switch
<el-switch v-model="scope.row.ztOpen"
v-model="scope.row.ztOpen" :active-text="scope.row.ztOpen ? '关闭' : '启用'"
:active-text="scope.row.ztOpen ? '关闭' : '启用'" :active-value="0"
:active-value="0" :inactive-value="1"
:inactive-value="1" style="margin: 0 10px 0 10px"
style="margin: 0 10px 0 10px" @change="switchOff(scope.row)"
@change="switchOff(scope.row)" ></el-switch>
></el-switch> </template>
</template> </el-table-column>
</el-table-column> </el-table>
</el-table> <div class="pagination">
<div class="pagination"> <el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
<el-pagination background @current-change="handleCurrentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> </div>
</div> </el-card>
</el-card>
</el-col>
</el-row>
<!--复制对话框--> <!--复制对话框-->
<el-dialog title="复制" :visible.sync="copyVisible" width="24%" center :close-on-click-modal="false"> <el-dialog title="复制" :visible.sync="copyVisible" width="24%" center :close-on-click-modal="false">

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

@ -140,15 +140,31 @@ export default {
}).catch(res => {}) }).catch(res => {})
}).catch(() => {}) }).catch(() => {})
}, },
// changeStatus(logId, open, draft) {
switchOff(val, row) {
this.$post(this.api.listUpdate, { this.$post(this.api.listUpdate, {
logId: row.logId, logId,
open: val open,
draft
}).then(res => { }).then(res => {
this.$message.success(val ? '禁用成功' : '启用成功') this.$message.success(open ? '禁用成功' : '启用成功')
this.getData()
}).catch(res => {}) }).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) { verChange(i) {
document.querySelector(`#ver${i}`).scrollIntoView() document.querySelector(`#ver${i}`).scrollIntoView()

Loading…
Cancel
Save