|
@@ -7,6 +7,7 @@
|
|
<div class="tree-container">
|
|
<div class="tree-container">
|
|
<el-scrollbar>
|
|
<el-scrollbar>
|
|
<el-tree
|
|
<el-tree
|
|
|
|
+
|
|
lazy
|
|
lazy
|
|
:load="loadNode"
|
|
:load="loadNode"
|
|
@node-click="handleNodeClick"
|
|
@node-click="handleNodeClick"
|
|
@@ -27,10 +28,14 @@
|
|
|
|
|
|
<el-card class="box-card h-100">
|
|
<el-card class="box-card h-100">
|
|
<div slot="header" class="clearfix">
|
|
<div slot="header" class="clearfix">
|
|
- <i class="el-icon-arrow-left" style="margin-right: 5px; cursor: pointer;" @click="goBackFirst"></i>
|
|
|
|
- <span>退出</span>
|
|
|
|
|
|
+
|
|
|
|
+ <el-link type="primary" @click="goBackFirst">
|
|
|
|
+ <i class="el-icon-arrow-left" style="margin-right: 5px; "></i>
|
|
|
|
+ <span>退出</span>
|
|
|
|
+ </el-link>
|
|
<div style="float: right;">
|
|
<div style="float: right;">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ :disabled="!treeId"
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
size="small"
|
|
size="small"
|
|
style="background-color:#2550A2;color:white;font-weight:bold;"
|
|
style="background-color:#2550A2;color:white;font-weight:bold;"
|
|
@@ -39,6 +44,7 @@
|
|
>新增
|
|
>新增
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ :disabled="!treeId"
|
|
icon="el-icon-document-copy"
|
|
icon="el-icon-document-copy"
|
|
size="small"
|
|
size="small"
|
|
style="background-color:#FFA042;color:white;font-weight:bold;"
|
|
style="background-color:#FFA042;color:white;font-weight:bold;"
|
|
@@ -50,26 +56,31 @@
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="rule-box">
|
|
|
|
- <div class="rule-box-item" v-for="item in ruleItemOptions" :key="item.id" @click="ruleDetailClick">
|
|
|
|
- <div class="rule-box-item-icon">
|
|
|
|
- <i class="el-icon-folder" style=" cursor: pointer; font-size: 48px;color:orange"></i>
|
|
|
|
- </div>
|
|
|
|
- <div class="rule-box-item-title">{{ item.title }}</div>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
|
|
+ <div v-if="ruleItemOptions.length>0">
|
|
|
|
+ <div class="rule-box" >
|
|
|
|
+ <div class="rule-box-item" v-for="(item,index) in ruleItemOptions" :key="index" @click="ruleDetailClick" >
|
|
|
|
+ <div class="rule-box-item-icon">
|
|
|
|
+ <i class="el-icon-folder" style=" cursor: pointer; font-size: 48px;color:orange"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="rule-box-item-title">{{ item.name }}</div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <el-pagination
|
|
|
|
+ style="margin-top: 30px;text-align: center;"
|
|
|
|
+ @size-change="handleSizeChange"
|
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
|
+ :current-page="currentPage"
|
|
|
|
+ :page-size="pageSize"
|
|
|
|
+ :total="ruleItemOptions.length"
|
|
|
|
+ layout="prev, pager, next"
|
|
|
|
+ class="pagination"
|
|
|
|
+ >
|
|
|
|
+ </el-pagination>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
- <el-pagination
|
|
|
|
- style="margin-top: 30px;text-align: center;"
|
|
|
|
- @size-change="handleSizeChange"
|
|
|
|
- @current-change="handleCurrentChange"
|
|
|
|
- :current-page="currentPage"
|
|
|
|
- :page-size="pageSize"
|
|
|
|
- :total="ruleItemOptions.length"
|
|
|
|
- layout="prev, pager, next"
|
|
|
|
- class="pagination"
|
|
|
|
- >
|
|
|
|
- </el-pagination>
|
|
|
|
|
|
+ <el-empty description="暂无数据" v-else class="empty-container"></el-empty>
|
|
</el-card>
|
|
</el-card>
|
|
</div>
|
|
</div>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -82,6 +93,7 @@
|
|
<span @click="goBack">返回上一级</span>
|
|
<span @click="goBack">返回上一级</span>
|
|
<div style="float: right;">
|
|
<div style="float: right;">
|
|
<el-button
|
|
<el-button
|
|
|
|
+
|
|
icon="el-icon-plus"
|
|
icon="el-icon-plus"
|
|
size="small"
|
|
size="small"
|
|
style="background-color:#2550A2;color:white;font-weight:bold;"
|
|
style="background-color:#2550A2;color:white;font-weight:bold;"
|
|
@@ -90,6 +102,7 @@
|
|
>新增
|
|
>新增
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
|
|
+
|
|
icon="el-icon-document-copy"
|
|
icon="el-icon-document-copy"
|
|
size="small"
|
|
size="small"
|
|
style="background-color:#FFA042;color:white;font-weight:bold;"
|
|
style="background-color:#FFA042;color:white;font-weight:bold;"
|
|
@@ -106,7 +119,7 @@
|
|
<div class="rule-box-item-icon">
|
|
<div class="rule-box-item-icon">
|
|
<i class="el-icon-tickets" style=" cursor: pointer; font-size: 48px;color:#2550A2"></i>
|
|
<i class="el-icon-tickets" style=" cursor: pointer; font-size: 48px;color:#2550A2"></i>
|
|
</div>
|
|
</div>
|
|
- <div class="rule-box-item-title">{{ item.title }}</div>
|
|
|
|
|
|
+ <div class="rule-box-item-title">{{ item.name }}</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -116,7 +129,7 @@
|
|
@current-change="handleCurrentChange"
|
|
@current-change="handleCurrentChange"
|
|
:current-page="currentPage"
|
|
:current-page="currentPage"
|
|
:page-size="pageSize"
|
|
:page-size="pageSize"
|
|
- :total="ruleItemOptions.length"
|
|
|
|
|
|
+ :total="total"
|
|
layout="prev, pager, next"
|
|
layout="prev, pager, next"
|
|
class="pagination"
|
|
class="pagination"
|
|
>
|
|
>
|
|
@@ -300,7 +313,7 @@
|
|
</div>
|
|
</div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="addDialogVisible = false">取 消</el-button>
|
|
<el-button @click="addDialogVisible = false">取 消</el-button>
|
|
- <el-button type="primary" @click="addDialogVisible = false">确 定</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="addSaveFileClick" :loading="addSaveFileLoad">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!-- 管理规范 -->
|
|
<!-- 管理规范 -->
|
|
@@ -380,7 +393,7 @@ import {getLazytree} from "@/api/manager/wbsprivate";
|
|
import ConditionsSet from './ConditionsSet.vue'
|
|
import ConditionsSet from './ConditionsSet.vue'
|
|
import LinkEle from "./LinkEle.vue";
|
|
import LinkEle from "./LinkEle.vue";
|
|
import PreviewResult from './PreviewResult.vue'
|
|
import PreviewResult from './PreviewResult.vue'
|
|
-import {getPage,getById} from "@/api/ruleManage/fileRule.js";
|
|
|
|
|
|
+import {getPage,getById,add} from "@/api/ruleManage/fileRule.js";
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
ConditionsSet,
|
|
ConditionsSet,
|
|
@@ -403,17 +416,14 @@ import {getPage,getById} from "@/api/ruleManage/fileRule.js";
|
|
},
|
|
},
|
|
},
|
|
},
|
|
ruleItemOptions:[
|
|
ruleItemOptions:[
|
|
- {id:1,title:'规范名称'},
|
|
|
|
- {id:2,title:'规范名称'},
|
|
|
|
- {id:3,title:'规范名称'},
|
|
|
|
- {id:1,title:'规范名称'},
|
|
|
|
- {id:2,title:'规范66名称'},
|
|
|
|
- {id:3,title:'规范名称'},
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
],
|
|
],
|
|
|
|
+ total: 0,
|
|
ruleLoading: false,
|
|
ruleLoading: false,
|
|
addDialogVisible:false,
|
|
addDialogVisible:false,
|
|
|
|
+ addSaveFileLoad:false,
|
|
titleInput:'',
|
|
titleInput:'',
|
|
isShowList:true,
|
|
isShowList:true,
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
@@ -497,23 +507,30 @@ import {getPage,getById} from "@/api/ruleManage/fileRule.js";
|
|
getRuleItemOptions() {
|
|
getRuleItemOptions() {
|
|
this.ruleLoading = true;
|
|
this.ruleLoading = true;
|
|
getPage({
|
|
getPage({
|
|
- id:this.treeId,
|
|
|
|
|
|
+ privateId:this.treeId,
|
|
current:this.currentPage,
|
|
current:this.currentPage,
|
|
size:this.pageSize,
|
|
size:this.pageSize,
|
|
type: 1,
|
|
type: 1,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
+ console.log(res,'res');
|
|
|
|
+
|
|
this.ruleLoading = false;
|
|
this.ruleLoading = false;
|
|
if (res.data.code === 200) {
|
|
if (res.data.code === 200) {
|
|
- this.ruleItemOptions = res.data.data;
|
|
|
|
|
|
+ this.ruleItemOptions = res.data.data.records;
|
|
|
|
+ this.total = res.data.data.total;
|
|
|
|
+
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
|
|
+ this.ruleItemOptions=[]
|
|
this.$message.error(res.data.msg);
|
|
this.$message.error(res.data.msg);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
handleNodeClick(data) {
|
|
handleNodeClick(data) {
|
|
- console.log(data);
|
|
|
|
|
|
+
|
|
this.treeId = data.id;
|
|
this.treeId = data.id;
|
|
|
|
+
|
|
this.getRuleItemOptions()
|
|
this.getRuleItemOptions()
|
|
},
|
|
},
|
|
loadNode(node, resolve) {
|
|
loadNode(node, resolve) {
|
|
@@ -545,8 +562,36 @@ import {getPage,getById} from "@/api/ruleManage/fileRule.js";
|
|
this.isShowDetail = false;
|
|
this.isShowDetail = false;
|
|
},
|
|
},
|
|
addRule(){
|
|
addRule(){
|
|
|
|
+ this.titleInput = '';
|
|
this.addDialogVisible = true;
|
|
this.addDialogVisible = true;
|
|
},
|
|
},
|
|
|
|
+ addSaveFileClick() {
|
|
|
|
+ this.addSaveFileLoad = true;
|
|
|
|
+ if (!this.titleInput) {
|
|
|
|
+ this.$message.error('请输入规范文件夹名称');
|
|
|
|
+ this.addSaveFileLoad = false;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ add(
|
|
|
|
+ {
|
|
|
|
+ name: this.titleInput,
|
|
|
|
+ type:1,
|
|
|
|
+ privateId: this.treeId,
|
|
|
|
+ }
|
|
|
|
+ ).then((res) => {
|
|
|
|
+ if(res.data.code==200){
|
|
|
|
+ this.$message.success(res.data.msg)
|
|
|
|
+
|
|
|
|
+ this.addDialogVisible=false
|
|
|
|
+ this.getRuleItemOptions();
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(res.data.msg)
|
|
|
|
+ }
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ this.saveBatchLoading = false;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ },
|
|
ruleDetailClick(){
|
|
ruleDetailClick(){
|
|
this.isShowList = false;
|
|
this.isShowList = false;
|
|
},
|
|
},
|
|
@@ -555,6 +600,8 @@ import {getPage,getById} from "@/api/ruleManage/fileRule.js";
|
|
this.isShowDetail = true;
|
|
this.isShowDetail = true;
|
|
},
|
|
},
|
|
addFile(){
|
|
addFile(){
|
|
|
|
+ console.log(this.treeId,'this.treeId');
|
|
|
|
+
|
|
//新增规范文件
|
|
//新增规范文件
|
|
this.addFileDialogVisible = true;
|
|
this.addFileDialogVisible = true;
|
|
},
|
|
},
|
|
@@ -915,4 +962,7 @@ import {getPage,getById} from "@/api/ruleManage/fileRule.js";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.empty-container{
|
|
|
|
+ height: 600px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|