Commit 879cc6d0 authored by zhang's avatar zhang

feat: (首页/信息管理/检验内容库)新增章节选择功能,更新页面样式

parent 2dc0a080
......@@ -159,12 +159,10 @@ export default {
this.$store.dispatch('standard/setStandardList', this.queryParams.name)
},
selectStandard(value) {
console.log(value)
this.$store.dispatch('standard/setStandard', value)
this.$store.dispatch('standard/setStandard', '')
this.loadData()
},
handleNodeClick(node,data){
console.log(data)
if(data.isCurrent){
node.isCurrent = true
}
......@@ -174,7 +172,7 @@ export default {
let standard = {
id:node.id,
name:node.label,
type:node.type || 'system',
type:node.type,
chapter: data.level == 1 ? ' ' : node.label
}
......@@ -367,6 +365,7 @@ export default {
}
::v-deep .el-tree-node__content { // 节点内容样式设置
width: 100%;
height: 30px;
//display: flex;
//justify-content: space-between;
margin-top: 5px;
......@@ -384,10 +383,12 @@ export default {
transition: all 0.5s;
}
::v-deep .el-tree-node__children .el-tree-node__content{// 子节点内容样式设置
height: 25px;
width: 200px;
background-color: white;
}
::v-deep .el-tree-node__children .el-tree-node__content:hover{// 子节点内容样式设置
background-color: #f0f7ff;
}
::v-deep .el-tree-node__children .el-tree-node__children .el-tree-node__content .el-tree-node__expand-icon{
opacity: 0;
}
......
......@@ -31,7 +31,7 @@
<!--章节选择:select-->
<el-form-item prop="status">
<el-input
v-model="queryParams.chapter"
v-model="searchQueryParams.chapter"
placeholder="请输入章节"
clearable
@keyup.enter.native="handleQuery"
......@@ -40,7 +40,7 @@
<!--标准要求输入:input-->
<el-form-item prop="status">
<el-input
v-model="queryParams.text"
v-model="searchQueryParams.text"
placeholder="请输入标准要求"
clearable
@keyup.enter.native="handleQuery"
......@@ -172,7 +172,7 @@
</span>
</span>
</el-tree>
<!-- <pagination
<pagination
style="height: 50px;"
v-show="total > 0"
:total="total"
......@@ -181,7 +181,7 @@
:limit.sync="queryParams.pageSize"
@pagination="loadData"
>
</pagination> -->
</pagination>
<!-- 详情弹窗
ref: 绑定detailModel组件
......@@ -258,6 +258,7 @@ export default {
}
},
listNewUrl:'/review/standard/listNew',
showSearch: true, // 是否显示搜索框
tableData: [], // 储存最终处理后的数据信息
queryParams: { // 条件参数,储存用于搜索的条件
......@@ -265,11 +266,17 @@ export default {
text: '',
name:'',
standardNo:'',
pageNum:1,
pageSize:10,
standardId: this.$store.getters.standard,
type:this.$store.getters.standard_type || 'system'
type:this.$store.getters.standard_type
},
searchQueryParams:{
chapter:'',
text:''
},
queryParams_final:{},
detailModelManager:{ // 传递参数,储存传递给弹窗的信息
dialogVisible:false, // 弹窗是否显现
refreshList: false,
source: { // 数据源
......@@ -363,8 +370,6 @@ export default {
console.log(data);
},
async loadData() {
console.log(this.queryParams) // 获取源数据并进行处理处理
if (this.queryParams.standardId !== '') {
this.loading = true
await request({
url: this.listUrl,
......@@ -421,11 +426,13 @@ export default {
await listInspection({id:tempDataItem.id}).then(res=>{// 根据tempDataItem的id搜索详细数据
if(res.code == 200){
let temp = res.data
console.log(temp)
forEach(temp,(pointItem)=>{
forEach(pointItem,(pointDeepItem)=>{
pointDeepItem.label = '审查要点'
pointDeepItem.content = pointDeepItem.text
pointDeepItem.quireId = tempDataItem.id
pointDeepItem.type = tempDataItem.type
obj.children.push(pointDeepItem)
})
})
......@@ -451,18 +458,29 @@ export default {
}
this.loading = false
})
}
},
reset() {
this.queryParams.chapter = ''
this.queryParams.text = ''
this.queryParams.standard = ''
this.queryParams.testMethod = ''
this.queryParams.name = ''
this.queryParams.standardNo = ''
this.queryParams.type = ''
this.loadData()
},
handleQuery(){
console.log(this.searchQueryParams)
this.queryParams.chapter = this.searchQueryParams.chapter
this.queryParams.standard = ''
this.queryParams.testMethod = ''
this.queryParams.name = ''
this.queryParams.standardNo = ''
this.queryParams.type = ''
this.queryParams.text = this.searchQueryParams.text
this.loadData()
},
handleUpdate(node) { // 查看检验内容 data:标准信息 node:审查信息
console.log(node)
let data = this.modelData.find((item)=>item.id === node.quireId) // 获取当前审查信息
let standard = this.standardList.find((item)=>item.id == this.standard)// 获取当前审查信息的standard信息
if(standard){
......@@ -470,7 +488,13 @@ export default {
}else{
data.standard = '--'
}
data.type =this.reviewTypeList.find((item)=>item.value == this.queryParams.type).label // 获取当前审查信息的类型
let review = this.reviewTypeList.find((item)=>item.value == node.type)
if(review){
data.type = review.label
}else{
data.type = ''
}
// 获取当前审查信息的类型
node.content = node.content.trim() // 去空格
this.detailModelManager.source.standard = data // 赋值传递弹窗
this.detailModelManager.source.judge = node
......
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